$removecs » History » Version 1
Per Amundsen, 08/10/2015 06:34 AM
| 1 | 1 | Per Amundsen | _Added in 1.8.10_ |
|---|---|---|---|
| 2 | |||
| 3 | *$removecs(string,substring,...)* |
||
| 4 | |||
| 5 | Removes any occurrence of substring in string. |
||
| 6 | |||
| 7 | _[[$removecs]] is case-sensitive, see [[$remove]] for case-insensitive version._ |
||
| 8 | |||
| 9 | *Parameters* |
||
| 10 | |||
| 11 | string - The string to search. |
||
| 12 | substring - The substring to remove. |
||
| 13 | ... - Additional substrings to remove. |
||
| 14 | |||
| 15 | *Example* |
||
| 16 | |||
| 17 | <pre> |
||
| 18 | ; Remove all occurrences of 'CD' from the string. |
||
| 19 | //echo -ag $removecs(abcdCDefg,CD) |
||
| 20 | |||
| 21 | ; Remove all occurrences of 'A', 'C', 'E', 'G' from the string. |
||
| 22 | //echo -ag $removecs(aAbcCdeEfgG,a,c,e,g) |
||
| 23 | </pre> |