-
Notifications
You must be signed in to change notification settings - Fork 1
`Lua Addons: String
GhostglowDev edited this page Mar 21, 2024
·
2 revisions
local string = require "ghostutil.lua-addons.string"
-
str
: String to split -
delimeter
: The string that splitsstr
string.split("i like-cats", "-")
-- returns: {"i like", "cats"}
string.shuffle("hello world")
string.ltrim(" krill me ")
-- returns "krill me "
string.rtrim(" krill me ")
-- returns " krill me"
string.trim(" krill me ")
-- returns "krill me"
string.startswith("thisthing", "this")
-- returns true
string.endswith("thisthing", "this")
-- returns false
Reading this wiki is recommended before using GhostUtil