Strings
Edit on GitHub
append
Appends the argument to the value.
capfirst
Converts the first character of the value to uppercase.
center
Centers the value in a field of a certain width using spaces.
filesizeformat
This filter formats a numeric value as KB, MB etc. This filter can be
used to display a number of bytes in a human readable format of kilo-
or megabytes.
format_duration
Show a duration in hours, minutes and seconds.
format_integer
Show an integer value.
format_number
Show an integer or float.
format_price
Show a price with decimals.
insert
Prepends the argument in front of the value.
is_valid_email
length
Returns the length of the value.
ljust
Justifies the value in a field of a certain width to the left, with spaces.
log_format_stack
Escapes and formats a Javascript string with a stack trace to readable HTML.
lower
Translates the value to lower case.
normalize_email
Normalize an email address, used in the identity management.
replace_args
Replace $N placeholders in string from a list of replacement
values.
rjust
Justifies the value in a field of a certain width to the right, using spaces.
split
Splits the filter value into a list of values.
stringify
Translates atoms, integers and floats to strings. The undefined value
is translated to the empty string. Does not translate tuples.
to_name
Map a string to a name . That is a lowercased string with only [a-z0-9_] characters.
toc
Filter to derive a Table Of Contents from a HTML body.
tokens
Returns a list of tokens from input string, separated by the characters in the filter argument.
translate
Translates a (English) value to the current language or the given language.
trim
Removes whitespace at the start and end of a string.
truncate
Truncate a text to a maximum length.
upper
Translates the value to upper case.
Resources
Filters
Survey