all(value, ...subStrings): bool | Checks if all substrings are part of value . | all("foo bar buzz", "bar", "buzz") |
any(value, ...subStrings): bool | Checks if at least one substring is part of value . | any("foo bar buzz", "test", "bar") |
endsWith(value, suffix): bool | Checks if a string ends with a suffix. | endsWith("Test string", " string") |
float(value): number|false | Converts a string to a float. | float("12.3") == 12.3 |
indexOf(value): number | Returns the zero-based index of a substring inside a string, and -1 if it is not found. | indexOf("666.0", ".") == 3 |
int(value): number|false | Converts a string to an integer. | int("10.0") == 10 |
isNaN(value, float = true): bool | Checks if a value cannot be parsed as number. | isNaN("is not a really number") |
join(sep, ...values[]): bool | Handles values as strings an join them with a separator. | join("+", "a", "b", " c") == "a+b+ c" |
norm(value): string | Normalizes a string for better comparison: creates lower case version, trims it and replace special characters like umlauts or whitespace | norm(" A tesT String: Ä ö Ü ß ") == "a test string: ae oe ue ss" |
log(value [, returnValue = false]): any | Logs a value. | log(methodName) or methodName == "getAllUsers" |
lower(value): string | Converts string to lower case chars. | lower("ThIs Is A tEsTsTrInG") == "this is a test string" |
regex(value, pattern [, flags = "i"]): bool | Tests a string for a regular expression. | not regex(methodName, "^(ZZZ)(\\s)(-)") |
str(value): string | Converts a value to a safe string. | str(1) == "1" |
startsWith(value, prefix): bool | Checks if a string starts with a prefix. | startsWith("Test string", "Test ") |
trim(value): string | Removes leading and ending whitespace characters from a string. | trim(" Test String ") === "Test String" |
trimEnd(value): string | Removes ending whitespace characters from a string. | trimEnd(" Test String ") === " Test String" |
trimStart(value): string | Removes leading whitespace characters from a string. | trimStart(" Test String ") === "Test String " |
upper(value): string | Converts string to upper case chars. | upper("ThIs Is A tEsTsTrInG") == "THIS IS A TEST STRING" |