Shared
Filters out a string from a string.
lib.filter
lib.filter(raw, ...)Parameters
- raw:
string: The string to filter. - ...varargs:
string | table<string, number>The filters to apply.
Returns
string: The filtered string.
Examples
local string = lib.filter("Hello World Lenix World", "World", "Lenix")
print(string)- Output: Hello
WorldLenixWorld
local string = lib.filter("Hello World Lenix World", { "World", 1 })
print(string)- Output: Hello
WorldLenix World
local string = lib.filter("Hello World Lenix World", { "World", 2 }, "Lenix")
print(string)- Output: Hello World
LenixWorld