Extends Lua 5.2 string.
contains (s, contains) | Tests if a string contains a given substring. |
ends_with (s, ends) | Tests if a string ends with a given substring. |
is_empty (s) | Tests whether a string is empty. |
split (s[, sep="."][, pattern=false]) | Splits a string into an array. |
starts_with (s, start) | Tests if a string starts with a given substring. |
trim (s) | Returns a copy of the string with any leading or trailing whitespace from the string removed. |
Tests if a string contains a given substring.
Parameters: Returns:
Tests if a string ends with a given substring.
Parameters: Returns:
Tests whether a string is empty.
Parameters:
Splits a string into an array.
Note: Empty split substrings are not included in the resulting table.
For example, string.split("foo.bar...", ".", false)
results in the table {"foo", "bar"}
.