23. translate-chars

translate-chars(from, to, node?)

Remap characters in the text contained in specified node and all its descendants. Parameter node defaults to the context node.

A character found in string from is replaced by the character at the corresponding position in string to. If there is a character in string from with no character at a corresponding position in string to (because string from is longer than string to), then the occurrences of that character are removed.


translate-chars("/", "\");

translate-chars(" -.", "_");

translate-chars(" ", " ", $title);