TextReplace

Revision as of 04:13, 14 January 2016 by Bbecane (talk | contribs)


TextReplace(text, pattern, subst, all, caseInsensitive)

Replaces the occurrence of «pattern» in «text» by «subst».

If «all» is omitted or False, replaces only the first occurrence. If «all» is True, replaces every occurrence of «pattern».

If «caseInsensitive» is True, matches to «pattern» in a case-insensitive fashion.

Library

Text Functions

Examples

TextReplace("One for one and one for all", "one", "two") →
"One for two and one for all"
TextReplace("One for one and one for all", "one", "two", caseInsensitive: True) →
"two for one and one for all"
TextReplace("One for one and one for all", "one", "two", all: True) →
"One for two and two for all"
TextReplace("One for one and one for all", "one", "two", all: True, caseInsensitive: True) →
"two for two and two for all"

See Also

Comments


You are not allowed to post comments.