string.multigsub
Replace multiple part of a string
Argument | Data Type | Needed | Default | Description |
---|---|---|---|---|
String | string | - | The original texture | |
Pattern | table | - | The pattern to find and replace | |
Replacement | table | - | The replacemente table |
Dont need to be called every frame
Example
local string = "i love me"
local new_string = string.multigsub(string, {"love", "me"}, {"hate", "you"})
print(new_string)
Expected result
i hate you
Last update: April 12, 2022
Created: June 27, 2021
Created: June 27, 2021