/
String:sub()

String:sub()

The sub method on a string allows you to get a substring of the source string provided based on the start and end position you specify.

In the following simple example, you can see “Mr.” is returned.

 

Related content

Strings
More like this
Take Control of your Data
Take Control of your Data
Read with this
How can I get part of string?
How can I get part of string?
More like this
Lua
Read with this
String:find()
More like this
Block statements
Block statements
Read with this