Copyright © 2008 Roberto Saccon, Evan Miller
Introduced in: 2007-11-11 by Roberto Saccon, Evan Miller -------------------------------------------------------------------
Authors: Roberto Saccon (rsaccon@gmail.com) [web site: http://rsaccon.com], Evan Miller (emmiller@gmail.com).
| add/2 | Adds to values. |
| addDefaultURI/1 | |
| addslashes/1 | Adds slashes before quotes. |
| capfirst/1 | Capitalizes the first character of the value. |
| cast_to_float/1 | |
| cast_to_integer/1 | |
| center/2 | Centers the value in a field of a given width. |
| cut/2 | Removes all values of arg from the given string. |
| date/1 | Formats a date according to the default format. |
| date/2 | Formats a date according to the given format. |
| date/3 | Formats a date according to the default format localizing it with provided translation function. |
| date/4 | |
| default/2 | If value evaluates to false, use given default. |
| default_if_none/2 | If (and only if) value is undefined, use given default. |
| dictsort/2 | Takes a list of dictionaries or proplists and returns that list sorted by the key given in the argument. |
| dictsortreversed/2 | Same as dictsort, but the list is reversed. |
| divisibleby/2 | Returns true if the value is divisible by the argument. |
| escapejs/1 | Escapes characters for use in JavaScript strings. |
| filesizeformat/1 | Format the value like a human-readable file size. |
| first/1 | Returns the first item in a list. |
| fix_ampersands/1 | Replaces ampersands with & entities. |
| floatformat/1 | When used without an argument, rounds a floating-point number to one decimal place -- but only if there's a decimal part to be displayed. |
| floatformat/2 | |
| force_escape/1 | Applies HTML escaping to a string. |
| format_integer/1 | |
| format_number/1 | |
| get_digit/2 | Given a whole number, returns the requested digit, where 1 is the right-most digit. |
| iriencode/1 | |
| join/2 | Joins a list with a given separator. |
| last/1 | Returns the last item in a list. |
| length/1 | Returns the length of the value. |
| length_is/2 | Returns True iff the value's length is the argument. |
| linebreaks/1 | Replaces line breaks in plain text with appropriate HTML. |
| linebreaksbr/1 | Converts all newlines to HTML line breaks. |
| linenumbers/1 | Displays text with line numbers. |
| ljust/2 | Left-aligns the value in a field of a given width. |
| lower/1 | Converts a string into all lowercase. |
| make_list/1 | Returns the value turned into a list. |
| phone2numeric/1 | Converts a phone number (possibly containing letters) to its numerical equivalent. |
| pluralize/1 | |
| pluralize/2 | Returns a plural suffix if the value is not 1. |
| pprint/1 | "pretty print" arbitrary data structures. |
| random/1 | Returns a random item from the given list. |
| random_num/1 | |
| random_range/1 | |
| removetags/2 | |
| rjust/2 | Right-aligns the value in a field of a given width. |
| round/2 | |
| slice/2 | Returns a slice of the list. |
| slugify/1 | Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. |
| stringformat/2 | Returns a formatted string. |
| stringformat_io/7 | A conversion specifier contains two or more characters and has the following components, which must occur in this order:. |
| striptags/1 | Strips all [X]HTML tags. |
| time/1 | Formats a time according to the given format. |
| time/2 | |
| timesince/1 | |
| timesince/2 | |
| timeuntil/1 | |
| timeuntil/2 | |
| title/1 | Converts a string into titlecase. |
| truncatechars/2 | Truncates a string after a certain number of characters. |
| truncatewords/2 | Truncates a string after a certain number of words. |
| truncatewords_html/2 | Similar to truncatewords, except that it is aware of HTML tags. |
| unjoin/2 | |
| unordered_list/1 | Recursively takes a self-nested list and returns an HTML unordered list -- WITHOUT opening and closing <ul> tags. |
| upper/1 | Converts a string into all uppercase. |
| urlencode/1 | Escapes a value for use in a URL. |
| urlencode/2 | |
| urlize/1 | Converts URLs in text into clickable links. |
| urlize/2 | |
| urlizetrunc/2 | Converts URLs into clickable links just like urlize, but truncates URLs longer than the given character limit. |
| wordcount/1 | Returns the number of words. |
| wordwrap/2 | Wraps words at specified line length, uses <BR/> html tag to delimit lines. |
| yesno/2 | Given a string mapping values for true, false and (optionally) undefined, returns one of those strings according to the value. |
add(LHS, RHS) -> any()
Adds to values
addDefaultURI(Domain) -> any()
addslashes(Input) -> any()
Adds slashes before quotes.
capfirst(T) -> any()
Capitalizes the first character of the value.
cast_to_float(Input) -> any()
cast_to_integer(Input) -> any()
center(Input, Number) -> any()
Centers the value in a field of a given width.
cut(Input, Arg) -> any()
Removes all values of arg from the given string.
date(Input) -> any()
Formats a date according to the default format.
date(Input, FormatStr) -> any()
Formats a date according to the given format.
date(Input, TransFun, Locale) -> any()
Formats a date according to the default format localizing it with provided translation function.
date(Input, FormatStr, TransFun, Locale) -> any()
default(Input, Default) -> any()
If value evaluates to false, use given default. Otherwise, use the value.
default_if_none(Input, Default) -> any()
If (and only if) value is undefined, use given default. Otherwise, use the value.
dictsort(DictList, Key) -> any()
Takes a list of dictionaries or proplists and returns that list sorted by the key given in the argument.
dictsortreversed(DictList, Key) -> any()
Same as dictsort, but the list is reversed.
divisibleby(Input, Divisor) -> any()
Returns true if the value is divisible by the argument.
escapejs(Input) -> any()
Escapes characters for use in JavaScript strings.
filesizeformat(Input) -> any()
Format the value like a human-readable file size.
first(Rest) -> any()
Returns the first item in a list.
fix_ampersands(Input) -> any()
Replaces ampersands with & entities.
floatformat(Number) -> any()
When used without an argument, rounds a floating-point number to one decimal place -- but only if there's a decimal part to be displayed
floatformat(Number, Place) -> any()
force_escape(Input) -> any()
Applies HTML escaping to a string.
format_integer(Input) -> any()
format_number(Input) -> any()
get_digit(Input, Digit) -> any()
Given a whole number, returns the requested digit, where 1 is the right-most digit.
iriencode(Input) -> any()
join(Input, Separator) -> any()
Joins a list with a given separator.
last(Input) -> any()
Returns the last item in a list.
length(Input) -> any()
Returns the length of the value.
length_is(Input, Number) -> any()
Returns True iff the value's length is the argument.
linebreaks(Input) -> any()
Replaces line breaks in plain text with appropriate HTML
linebreaksbr(Input) -> any()
Converts all newlines to HTML line breaks.
linenumbers(Input) -> any()
Displays text with line numbers.
ljust(Input, Number) -> any()
Left-aligns the value in a field of a given width.
lower(Input) -> any()
Converts a string into all lowercase.
make_list(Input) -> any()
Returns the value turned into a list. For an integer, it's a list of digits. For a string, it's a list of characters. Added this for DTL compatibility, but since strings are lists in Erlang, no need for this.
phone2numeric(Input) -> any()
Converts a phone number (possibly containing letters) to its numerical equivalent.
pluralize(Number) -> any()
pluralize(Number, Suffix) -> any()
Returns a plural suffix if the value is not 1. By default, this suffix is 's'.
pprint(Input) -> any()
"pretty print" arbitrary data structures. Used for debugging.
random(Input) -> any()
Returns a random item from the given list.
random_num(Value) -> any()
random_range(Range) -> any()
removetags(Input, Tags) -> any()
rjust(Input, Number) -> any()
Right-aligns the value in a field of a given width.
round(Number, Precision) -> any()
slice(Input, Index) -> any()
Returns a slice of the list.
slugify(Input) -> any()
Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens.
stringformat(Input, Conversion) -> any()
Returns a formatted string
stringformat_io(Input, Conversion, ConversionFlag, MinFieldWidth, Precision, PrecisionLength, X7) -> any()
A conversion specifier contains two or more characters and has the following components, which must occur in this order:
1. The "%" character, which marks the start of the specifier. 2. Mapping key (optional), consisting of a parenthesised sequence of characters (for example, (somename)). 3. Conversion flags (optional), which affect the result of some conversion types. 4. Minimum field width (optional). If specified as an "*" (asterisk), the actual width is read from the next element of the tuple in values, and the object to convert comes after the minimum field width and optional precision. 5. Precision (optional), given as a "." (dot) followed by the precision. If specified as "*" (an asterisk), the actual width is read from the next element of the tuple in values, and the value to convert comes after the precision. 6. Length modifier (optional). 7. Conversion type.striptags(Input) -> any()
Strips all [X]HTML tags.
time(Input) -> any()
Formats a time according to the given format.
time(Input, FormatStr) -> any()
timesince(Date) -> any()
timesince(Date, Comparison) -> any()
timeuntil(Date) -> any()
timeuntil(Date, Comparison) -> any()
title(Input) -> any()
Converts a string into titlecase.
truncatechars(Input, Max) -> any()
Truncates a string after a certain number of characters.
truncatewords(Input, Max) -> any()
Truncates a string after a certain number of words.
truncatewords_html(Input, Max) -> any()
Similar to truncatewords, except that it is aware of HTML tags.
unjoin(String, L) -> any()
unordered_list(List) -> any()
Recursively takes a self-nested list and returns an HTML unordered list -- WITHOUT opening and closing <ul> tags.
upper(Input) -> any()
Converts a string into all uppercase.
urlencode(Input) -> any()
Escapes a value for use in a URL.
urlencode(Input, Safe) -> any()
urlize(Input) -> any()
Converts URLs in text into clickable links.
urlize(Input, Trunc) -> any()
urlizetrunc(Input, Trunc) -> any()
Converts URLs into clickable links just like urlize, but truncates URLs longer than the given character limit.
wordcount(Input) -> any()
Returns the number of words.
wordwrap(Input, Number) -> any()
Wraps words at specified line length, uses <BR/> html tag to delimit lines
yesno(Bool, Choices) -> any()
Given a string mapping values for true, false and (optionally) undefined, returns one of those strings according to the value.
Generated by EDoc