Railo 4.2 Reference
Choose a function:

Function REPLACE

Replaces occurrences of substring1 in a string with substring2,
in a specified scope. The search is case-sensitive.

Beispiel

replace(string string,any substring1,[string substring2,[string scope]]):string

Argumente

Die Argumente für diese Funktion sind fest vorgegeben. Ausser den nachfolgenden Argumenten dürfen keine weiteren verwendet werden.
Name Typ Required Beschreibung
string string  Yes String in which to search.  
substring1 any  Yes Substring for which to search. Optionally pass a Struct with key/value pairs to do a replace all  
substring2 string  No Substring with which to replace the found matches. This arg is required if the substring1 arg is a string  
scope string  No scope for the execution:
  • one (default): replaces only the first occurrence
  • all: replaces all occurrences