Append |
append a string e.g. {{ 'foo' | Append:'bar' }} #=> 'foobar' |
Default |
returns the given variable unless it is null or the empty string, when it will
return
the given value, e.g. {{ undefined_variable | Default: "Default value" }} #=>
"Default value" |
Downcase |
convert an input string to lowercase |
DowncaseFirst |
convert the first letter to lowercase |
ExtractValue |
extract the value from the parenthesis
e.g. {{ varchar(50) | ExtractValue }} #=> 50
e.g. {{ decimal(10,2) | ExtractValue }} #=> 10,2
|
Lstrip |
strips all whitespace from the beginning of a string |
Prepend |
prepend a string e.g. {{ 'bar' | Prepend:'foo' }} #=> 'foobar' |
Pluralized |
convert a word in plural form e.g. {{ 'category' | Pluralized }} #=> 'categories'
|
RemoveFirst |
remove the first occurrence e.g. {{ 'barbar' | RemoveFirst:'bar' }}
#=> 'bar' |
RemoveLast |
remove the last occurrence e.g. {{ 'CategoryId' | RemoveLast:'Id' }}
#=> 'Category' |
Remove |
remove each occurrence e.g. {{ 'foobarfoobar' | Remove:'foo' }} #=>
'barbar |
ReplaceFirst |
replace the first occurrence e.g. {{ 'barbar' |
ReplaceFirst:'bar','foo' }} #=> 'foobar' |
Replace |
replace each occurrence e.g. {{ 'foofoo' | Replace:'foo','bar' }} #=>
'barbar' |
Rstrip |
strips all whitespace from the end of a string |
SeparateWords |
insert a separator between the words, e.g. {{ 'InStock' | SeparateWords: ' ' }}
#=> In Stock |
Slice |
slice a string. Takes an offset and length, e.g. {{ "hello" | Slice: -3, 3 }}
#=> llo |
Split |
split a string on a matching pattern e.g. {{ "a~b" | Split:"~" }} #=>
['a','b'] |
StripNewlines |
strip all newlines (\n) from string |
Strip |
Strips all whitespace from both ends of the string |
Truncate |
truncate a string down to x characters. It also accepts a second parameter that
will append to the string e.g. {{ 'foobarfoobar' | Truncate: 5, '.' }} #=>
'foob.' |
Truncatewords |
truncate a string down to x words |
Uniq |
removed duplicate elements from an array, optionally using a given property to test
for uniqueness |
Upcase |
convert an input string to uppercase |