stringx
Provides extended string manipulation functions beyond standard Lua string library.
Registered as `stringx` global.
| Function |
|---|
trim(str: string): string |
Removes leading and trailing whitespace from a string. |
startsWith(str: string, prefix: string): boolean |
Checks if a string starts with the specified prefix. |
endsWith(str: string, suffix: string): boolean |
Checks if a string ends with the specified suffix. |
removeSuffix(str: string, suffix: string): string |
Removes the specified suffix from a string if it exists. |
split(str: string, separator: string): table |
Splits a string into a table of substrings using the specified separator. |
substringAfter(str: string, separator: string): string |
Returns the substring after the first occurrence of the separator. |