llReplaceSubString
function ll.ReplaceSubString(InitialString: string, SubString: string, NewSubString: string, Count: number): stringSearches InitialString and replaces instances of SubString with NewSubString. Zero Count means "replace all". Positive Count moves left to right. Negative moves right to left.
Parameters
-
InitialString(string) - The original string in which to hunt for substring matches.
-
SubString(string) - The original substring to find.
-
NewSubString(string) - The new substring used to replace.
-
Count(number) - The max number of replacements to make. Zero Count means "replace all". Positive Count moves left to right. Negative moves right to left.
Examples
Section titled “Examples”Add example usage here showing SLua/Luau syntax with ll.ReplaceSubString().
Add additional notes, caveats, or tips specific to using this function in SLua/Luau.
See Also
Section titled “See Also”- Related functions can be linked here
- LSL equivalent: llReplaceSubString