This library provides generic functions for string manipulation,
such as finding and extracting substrings, and pattern matching.
When indexing a string in Lua, the first character is at position 1
(not at 0, as in C).
Indices are allowed to be negative and are interpreted as indexing backwards,
from the end of the string.
Thus, the last character is at position -1, and so on.
The string library provides all its functions inside the table
It also sets a metatable for strings
__index field points to the
Therefore, you can use the string functions in object-oriented style.
can be written as
The string library assumes one-byte character encodings.