|
LifeLua 21-08-2025
Documentation for LifeLua, a Lua interpreter for the PS Vita
|
Extra string functions (extends Lua's string library) More...
These are added to Lua's standard string library, so like the other string functions, they can be called as methods on any string:
Functions | |
| boolean | string.startswith (string str, string prefix, boolean ignorecase) |
| boolean | string.endswith (string str, string suffix, boolean ignorecase) |
| table | string.split (string str, string delimiters) |
| boolean string.endswith | ( | string | str, |
| string | suffix, | ||
| boolean | ignorecase ) |
Checks if a string ends with another string
Method form: str:endswith(suffix, ignorecase)
| str | The string to check |
| suffix | The end to look for |
| ignorecase | true to ignore the difference between upper and lower case (optional, default: false) |
true if str ends with suffix | table string.split | ( | string | str, |
| string | delimiters ) |
Splits a string into a list of parts. Every character of delimiters counts as a separator, and empty parts are skipped.
Method form: str:split(delimiters)
| str | The string to split |
| delimiters | The separator character(s) (optional, default: " ") |
| boolean string.startswith | ( | string | str, |
| string | prefix, | ||
| boolean | ignorecase ) |
Checks if a string starts with another string
Method form: str:startswith(prefix, ignorecase)
| str | The string to check |
| prefix | The start to look for |
| ignorecase | true to ignore the difference between upper and lower case (optional, default: false) |
true if str starts with prefix