From 2311c865b89a291fdf60a834482b9dbe71274571 Mon Sep 17 00:00:00 2001 From: gered Date: Sun, 23 Mar 2014 12:04:03 -0400 Subject: [PATCH] update documentation with the newly added functions --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index a79a2d8..93164c2 100644 --- a/README.md +++ b/README.md @@ -179,6 +179,8 @@ A number of functions are provided out of the box by Jtwig. A few more are provi | blank_if_null | `blank_if_null(value)`
If the value given is null, returns a blank string instead of "null". | butlast | `butlast(collection)`
Returns all items from a list except for the last one. | capitalize | `capitalize(value)`
Capitalizes a value. The first character will be uppercase, all others lowercase. +| capitalize_all | `capitalize_all(value)`
Capitalizes all words (separate by whitespace) in a string. The first character in each word will be uppercase. +| center | `center(value, max_width)`
Pads a string with whitespace on the left and right as necessary to 'center' the given value. | concat | `concat(values, ...)`
Concatenates any number of values together as strings. | convert_encoding | `convert_encoding(string, output_charset, input_charset)`
Converts a string from one encoding to another. The first argument is the expected output charset and the second one is the input charset. | date_format | `date_format(date, format, timezone)`
Formats a date to a given format. The format specifier is the same as supported by `SimpleDateFormat`. @@ -188,6 +190,7 @@ A number of functions are provided out of the box by Jtwig. A few more are provi | escape | `escape(value, strategy)`
Escapes a string for safe insertion into the final output. The second parameter specifies the escape strategy: 'html' (default), 'js' or 'xml'. | first | `first(collection)`
Returns the first "element" of a sequence, or a string. | format | `format(format_string, values, ...)`
Formats a given string by replacing the placeholders (placeholders follow the `String.format` notation). +| javascript | `javascript(url)`
Returns a `