ez.no / ezpublish / documentation / reference / template operators / strings
These documentation pages are no longer maintained. Please visit the new documentation site.
The following table contains a list of template operators related to strings and string handling. Click on the name of an operator for more information about that specific operator (usage, parameters, description, examplets, etc.).
| Operator | Description |
|---|---|
| mimetype_icon | Converts a MIME-Type string into an icon. |
| append | Appends element(s) to a string. |
| begins_with | Checks if a string starts with a specific element/sequence. |
| break | Inserts HTML line breaks instead of newlines. |
| ord | Returns a desired sequence of characters. |
| compare | Compares the contents of two strings. |
| concat | Concatenates values to one string. |
| contains | Checks if a string contains a specific element. |
| count_chars | Counts and returns the number of characters (string length). |
| count_words | Counts and returns the number of words within a string. |
| crc32 | Calculates the CRC32 polynomial of a string. |
| downcase | Converts all alphabetical characters to lowercase. |
| ends_with | Checks if a string ends with a specific element/sequence. |
| explode | Splits a string into an array of substrings. |
| extract | Extracts a portion from a string. |
| extract left | Extracts a portion from the start of a string. |
| extract_right | Extracts a portion from the end of a string. |
| indent | Indents a string by inserting characters at the start of it. |
| insert | Inserts stuff at specified position in a string. |
| md5 | Calculate the md5 hash of a string. |
| nl2br | Converts newlines to HTML br. |
| chr | Creates a string based on array of ASCII/Unicode values. |
| pad | Makes sure a string is at least n characters long. |
| prepend | Prepends custom sequence to a string. |
| remove | Removes element(s) from a string. |
| repeat | Repeats the contents of a string. |
| reverse | Reverses the contents of a string. |
| rot13 | Performs a rot13 transform on a string. |
| shorten | Shortens a string to a few characters + adds trailing seq. |
| simplify | Transforms multiple consecutive characters into one. |
| trim | Strips whitespace from beginning and/or end of a string. |
| upcase | Converts all alphabetical characters to uppercase. |
| upfirst | Converts the first character to uppercase. |
| upword | Converts all the first characters (in all words) to uppercase. |
| wash | General text wash. Translates bogus strings to friendly ones. |
| wordtoimage | Replaces special sequences of text with images. |
| wrap | Wraps text to lines at a specified length. |
Comments
see new contrib: str_replace
Samuel Sauder
Wednesday 27 April 2005 9:10:30 pm
A simple replace function?
Martin Leblanc
Tuesday 12 October 2004 1:49:04 pm