string.PatternSafe
Example
Replaces all occurrences of "100%" in a string with "0%" and prints it.
We call string.PatternSafe here as '%' is a special character when used in Lua patterns.
Output: You scored 0%!
Escapes all special characters within a string, making the string safe for inclusion in a Lua pattern.
Replaces all occurrences of "100%" in a string with "0%" and prints it.
We call string.PatternSafe here as '%' is a special character when used in Lua patterns.