Module stringutil
Various utility functions for working with strings.
Functions
concat (...) | Concats all the given items by invoking tostring on them into one string. |
endswith (text, value) | Tests if the given text ends with the given value. |
split (text, split) | Splits the given text using the given split value. |
startswith (text, value) | Tests if the given text starts with the given value. |
Functions
- concat (...)
-
Concats all the given items by invoking tostring on them into one string.
Parameters:
- ... The items to concat.
Returns:
-
The concatenated items as string.
- 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.
Returns:
-
true if the given text ends with the value.
- 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.
Returns:
-
The list of splitted values.
- 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.
Returns:
-
true if the given text starts with the value.