✓ Accepted answer
The first argument of string.sub() is usually referred to as the String obviously, this is the string you will be using in string.sub().
The second argument of string.sub() is referred to as i and is the starting point for the string, this will then go to the third argument referred to as j which will return a string counting the character arguments i and j
-- > all vanilla string libaries.
-- > example usage:
local String = "WOW! YOU CAN DO THIS?"
local i = 5
string.sub(String, i)
-- > example of string.gsub() as asked in comments:
local String = "Hello, i don't like you!"
local GSUB = string.gsub(String, "i don't like you!", "i like you!")
print(GSUB)
7 comments
Would I be able to delete strings using string.sub() ?
By that I mean deleting certain characters
not really, you would need to use string.gsub() to replace the certain characters you want i can edit an example in if you want.
I would like an example
Edited in, check.
Many thanks
Welcome, good luck scripting.