docServerUserLandCom picture
Contents
Frontier Site

string.replaceAll

Syntax string.replaceAll (s, searchfor, replacewith, flCaseSensitive = true)

Params s is the string in which the replacement should occur.

searchfor is the string of characters to be replaced.

replacewith is the string of characters to replace searchfor.

flCaseSensitive is an optional boolean determining whether the search should be case-sensitive. Default: True.

Action Locates every occurrence of searchfor in s and replaces each of them with replacewith.

Returns The resulting string. If searchfor is not found in string, then s is returned unchanged.

Examples string.replaceAll ("System:System Folder:Control Panels", ":", "-")
// "System-System Folder-Control Panels"

string.replaceAll ("abcdefghijklm", "xxx", "12345")
// "abcdefghijklm" // "xxx" not found, so string is unchanged.

See Also string.replace


© Copyright 1992-2026 UserLand Software. Email: webmaster@userland.com.