Note:
在 FreeMarker 2.3.23 中,指令名可以使用驼峰样式来代替蛇形样式,
比如 startsWith
代替 starts_with
。
但是要知道,在相同模版内,FreeMarker 会强制对模板语言部分的所有标识符使用驼峰样式
(用户自定义名称不会受影响)。
- abs
- ancestors
- api
- boolean
- byte
- c for strings, for booleans
- cap_first
- capitalize
- ceiling
- children
- chop_linebreak
- chunk
- contains
- counter
- date for dates, for strings
- date_if_unknown
- datetime for dates, for strings
- datetime_if_unknown
- double
- ends_with
- ensure_ends_with
- ensure_starts_with
- eval
- first
- floor
- groups
- float
- has_api
- has_content
- has_next
- html
- index
- index_of
- int
- interpret
- item_cycle
- item_parity
- item_parity_cap
- is_even_item
- is_first
- is_infinite
- is_last
- is_nan
- is_odd_item
- is_type
- iso, iso_...
- j_string
- join
- js_string
- keep_after
- keep_after_last
- keep_before
- keep_before_last
- keys
- last
- last_index_of
- left_pad
- length
- long
- lower_abc
- lower_case
- matches
- namespace
- new
- node_namespace
- node_name
- node_type
- number
- number_to_date, number_to_datetime, number_to_time
- parent
- replace
- remove_beginning
- remove_ending
- reverse
- right_pad
- round
- root
- rtf
- short
- size
- sort
- seq_contains
- seq_index_of
- seq_last_index_of
- sort_by
- split
- starts_with
- string: for strings, for numbers, for booleans, for date/time/date-time
- substring (deprecated)
- switch
- then
- time for date/time/date-time, for strings
- time_if_unknown
- trim
- uncap_first
- upper_abc
- upper_case
- url
- values
- word_list
- xhtml
- xml
点击 这里 参考按照表达式左侧值类型分类的内建函数。
如果在这里没有发现模板中的内建函数,那么可能会在这里找到:废弃的 FTL 结构