string.replaceNoCase()
Replaces occurrences of substring1 with substring2, in the specified scope.
The search is case-insensitive.
string.replaceNoCase( substring=any, replacement=string, scope=string )
Returns: String
| Argument | Description |
|---|---|
|
substring
any,
required
|
edit
Substring for which to search. Optionally pass a Struct with key/value pairs to do a replace all Alias: substring1 |
|
replacement
string,
optional
|
edit
Substring with which to replace the found matches. This arg is required if the substring1 arg is a string Alias: substring2 |
|
scope
string,
optional
|
edit
scope for the execution:
|
Examples
editstr = "Lucee";
res = str.replacenocase("U","U","all");
writeDump(res);
res = str.replacenocase("l","Love L","all");
writeDump(res);
res = str.replacenocase("L","","all");
writeDump(res);
res = str.replacenocase("lUCEE","I Love Lucee","all");
writeDump(res);