File utils/stringutil.lua
Functions
stringutil.concat (...) | Concats all the given items by invoking tostring on them into one string. |
stringutil.endswith (text, value) | Tests if the given text ends with the given value. |
stringutil.split (text, split) | Splits the given text using the given split value. |
stringutil.startswith (text, value) | Tests if the given text starts with the given value. |
Functions
- stringutil.concat (...)
-
Concats all the given items by invoking tostring on them into one string.
Parameters
- ...: The items to concat.
Return value:
The concatenated items as string. - stringutil.endswith (text, value)
-
Tests if the given text ends with the given value.
Parameters
- text: The text to check if it ends with the given value.
- value: The value that text should end with.
Return value:
true if the given text ends with the value. - stringutil.split (text, split)
-
Splits the given text using the given split value. Returns the splitted text as List. If the string is empty or nil, the returned list will not contain any entries. If the string only contains a value without a separator, the list will contain one value, if it contains only the separator, two empty values.
Parameters
- text: The text to split.
- split: The split value.
Return value:
The list of splitted values. - stringutil.startswith (text, value)
-
Tests if the given text starts with the given value.
Parameters
- text: The text to check if it starts with the given value.
- value: The value that text should start with.
Return value:
true if the given text starts with the value.