Project

General

Profile

$replacexcs » History » Version 1

Per Amundsen, 08/10/2015 06:42 AM

1 1 Per Amundsen
_Added in 1.9.0_
2
3
*$replacexcs(string,substring,newstring,...)*
4
5
Replaces any occurrence of substring in string with newstring except for replacements that have already been made.
6
7
_[[$replacexcs]] is case-sensitive, see [[$replacex]] for case-insensitive version._
8
9
*Parameters*
10
11
string - The string to search.
12
substring - The substring to replace.
13
newstring - The new string to replace with.
14
... - Additional substrings to replace.
15
16
*Example*
17
18
<pre>
19
; Replace all occurrences of 'CD' in the string with 'XYZ'.
20
//echo -ag $replacexcs(abcdCDefg,CD,XYZ)
21
22
; Remove all occurrences of 'a', 'b', 'c', 'd' in the string with 'A', 'B', 'C', 'D'.
23
//echo -ag $replacexcs(aAbBcCdDeEfFgG,a,A,b,B,c,C,d,D)
24
</pre>