$remove » History » Version 3
Per Amundsen, 02/23/2023 07:23 PM
| 1 | 1 | Per Amundsen | _Added in 1.8.10_ |
|---|---|---|---|
| 2 | |||
| 3 | *$remove(string,substring,...)* |
||
| 4 | |||
| 5 | Removes any occurrence of substring in string. |
||
| 6 | |||
| 7 | _[[$remove]] is case-insensitive, see [[$removecs]] for case-sensitive version._ |
||
| 8 | |||
| 9 | *Parameters* |
||
| 10 | |||
| 11 | 3 | Per Amundsen | table(ktable). |
| 12 | |*Parameter*|*Description*| |
||
| 13 | | string | The string to search. | |
||
| 14 | | substring | The substring to remove. | |
||
| 15 | | ... | Additional substrings to remove. | |
||
| 16 | 1 | Per Amundsen | |
| 17 | *Example* |
||
| 18 | |||
| 19 | <pre> |
||
| 20 | ; Remove all occurrences of 'cd' from the string. |
||
| 21 | //echo -ag $remove(abcdefg,cd) |
||
| 22 | |||
| 23 | 2 | Per Amundsen | ; Remove all occurrences of 'a', 'c', 'e', 'g' from the string. |
| 24 | 1 | Per Amundsen | //echo -ag $remove(abcdefg,a,c,e,g) |
| 25 | </pre> |