Fork me on GitHub

Module ringo/skin/filters

Implements some useful macro filters.


capitalize_filter (input)

Transforms the first Character of a string to uppercase.

Parameters

input

dateFormat_filter (format)

Returns a formatted string representation of a Date. Simply wraps javascripts Date.format-method.

Parameters

format

escapeHtml_filter (input)

Escapes the characters in a String using HTML entities.

Parameters

input

escapeJavaScript_filter (input)

Escapes a string so it may be used in JavaScript String definitions.

Parameters

input

escapeUrl_filter (charset)

Escapes the characters in a String to be suitable to use as an HTTP parameter value.

Parameters

charset Optional String. The name of a supported character encoding.

escapeXml_filter (input)

Escapes the characters in a String using XML entities.

Parameters

input

linebreakToHtml_filter (input)

Replaces linebreaks with HTML linebreaks.

Parameters

input

lowercase_filter (input)

Transforms a string to lowercase.

Parameters

input

replace_filter (old, new)

Performs a string replacement.

Parameters

old
new

stripTags_filter (input)

Removes all tags from a String. Currently simply wraps Ringo's stripTags-method.

Parameters

input

substring_filter (from, to)

Returns a substring. Simply wraps the javascript method 'substring'.

Parameters

from
to

titleize_filter (input)

Transforms the first Character of each word in a string to uppercase.

Parameters

input

trim_filter (input)

Removes leading and trailing whitespaces.

Parameters

input

truncate_filter (limit, suffix)

Cuts a String at a certain position, and optionally appends a suffix, if truncation has occurred.

Parameters

limit maximum length
suffix appended String, default is "..."

uppercase_filter (input)

Transforms a string to uppercase.

Parameters

input