strChange |
|
strChange( const string, // string to treat const oldpatt, // old pattern to be replaced const newpatt, // new pattern [const start, // start position in string (1-based), default = 1 const count]) // # of occurrences to replace (default = all) Replaces occurrences of a pattern by another text. Examples: const s = 'abc def ghi abc def'; strChange(s, 'abc', 'ABCX'); // ABCX def ghi ABCX def strChange(s, 'abc', 'AB', 2); // abc def ghi AB def strChange(s, 'abc', 'ABC', 1, 1); // ABC def ghi abc def | ||||||||
Copyright © IBK Landquart | Last revised by Peter Koch, 24.02.00 | << Back Top Next >> |