Project

General

Profile

Actions

$replacecs » History » Revision 1

Revision 1/2 | Next »
Per Amundsen, 08/10/2015 06:39 AM


Added in 1.8.10

$replacecs(string,substring,newstring,...)

Replaces any occurrence of substring in string with newstring.

$replacecs is case-sensitive, see $replace for case-insensitive version.

Parameters

string - The string to search.
substring - The substring to replace.
newstring - The new string to replace with.
... - Additional substrings to replace.

Example

; Replace all occurrences of 'CD' in the string with 'XYZ'.
//echo -ag $replacecs(abcdCDefg,CD,XYZ)

; Remove all occurrences of 'a', 'b', 'c', 'd' in the string with 'A', 'B', 'C', 'D'.
//echo -ag $replacecs(aAbBcCdDeEfFgG,a,A,b,B,c,C,d,D)

Updated by Per Amundsen over 8 years ago · 1 revisions

Also available in: PDF HTML TXT