SocialluxSociallux
Toggle navigation menu
Docs navigationv

Primitive

string.replace

BETA

Short name: replace

Version: 1.0.0

Perform literal find-and-replace on a string.

Back to primitive library

Inputs

KeyTypeRequiredDescription
allbooleanfalseWhen true, replace all matches. When false, replace only the first match.
findstringtrueLiteral text to find. Must be non-empty.
replacementstringtrueLiteral replacement text.
textstringtrueInput text to search.

Outputs

KeyTypeRequiredDescription
replacementsnumberfalseNumber of replacements performed.
resultstringfalseText after replacement.