rstring
Available since Exponential 6.0.13.
Summary
str_ireplace( search, replace, subject ) — case-insensitive in-string replace Template: {$subject|rstring( "Search", "replacement" )} Supports scalar and array search/replace patterns.
Description
PHP string function operators for Exponential templates.
Provides template access to PHP string functions documented athttps://www.php.net/manual/en/ref.strings.php that are NOT alreadycovered by existing Exponential template operators.
The piped input value maps to the primary string argument of each PHPfunction. Additional template parameters map to the remaining PHP argumentsin left-to-right positional order.
The following operators are intentionally NOT implemented in this classbecause they are already available as built-in Exponential template operators: chr, ord, trim, nl2br, rot13/str_rot13, crc32, md5, sha1, concat, indent, upcase/strtoupper, downcase/strtolower, count_chars (mb_strlen), count_words, break (nl2br), wrap/wordwrap, shorten, pad/str_pad, upfirst/ucfirst, upword/ucwords, simplify, wash/htmlspecialchars, append, prepend, merge, contains, compare, extract, extract_left, extract_right, begins_with, ends_with, implode, explode, repeat/str_repeat, reverse/strrev, insert, remove, replace, unique, array_sum.
Creative additions:- ristring: str_replace(search, replace, subject) — case-sensitive replace- rstring: str_ireplace(search, replace, subject) — case-insensitive replace
Examples
{$str|rstring("Search", "replacement")}Source
Implemented by eZTemplateStringsOperator (lib/eztemplate/classes/eztemplatestringsoperator.php).
See also
Added to the reference for Exponential 6.0.15: the 4.x reference had no page for this operator.
Graham Brookins (05/11/2026 9:25 am)
Graham Brookins (05/11/2026 11:19 am)