Functions -
stringutils
| contains | Checks whether the given string contains a particular substring. |
| equalsIgnoreCase | Checks if two strings are equal, ignoring the case of the strings. |
| hashCode | Returns a hash code for a given string. |
| lastIndexOf | Returns the last index of the provided substring within a string. |
| matches | Checks whether the given string matches with the provided regex. |
| replace | Replaces each substring of the provided string, that matches the provided substring, with the specified replacement string. |
| replaceAll | Replaces each substring which matches the given regular expression, from the given original string value, with the specified replacement string. |
| replaceFirst | Replaces the first substring that matches the given regular expression, with the specified replacement string. |
| split | Splits a string using the given delimiter. |
| toBoolean | Returns a boolean value of a given string. |
Checks whether the given string contains a particular substring.
Parameters
- originalString string
-
the original string
- substring string
-
string to match
-
Return Type
(boolean) trueif the original string contains the substring orfalseotherwise
Checks if two strings are equal, ignoring the case of the strings.
Parameters
- firstString string
-
first string to compare
- secondString string
-
second string to compare
-
Return Type
(boolean) trueif the two strings are the same orfalseif the strings do not match
Returns a hash code for a given string.
Parameters
- stringValue string
-
string to generate the hash code
-
Return Type
(int) hash code for the given string
Returns the last index of the provided substring within a string.
Parameters
- originalString string
-
the original string to search in
- substring string
-
string to look for
-
Return Type
(int) starting point of the last appearance of the provided substring
Checks whether the given string matches with the provided regex.
Parameters
- stringToMatch string
-
string to match with the regex
- regex string
-
regex to match with the string
-
Return Type
(boolean) trueif the provided string is matched with the regex,falseotherwise
Replaces each substring of the provided string, that matches the provided substring, with the specified replacement string.
Parameters
- originalString string
-
original string
- stringToReplace string
-
string to replace
- replacement string
-
replacement string
-
Return Type
(string) the resultant string
Replaces each substring which matches the given regular expression, from the given original string value, with the specified replacement string.
Parameters
- originalString string
-
original string
- regex string
-
Regex to find substrings to replace
- replacement string
-
the replacement string
-
Return Type
(string) the resultant string
Replaces the first substring that matches the given regular expression, with the specified replacement string.
Parameters
- originalString string
-
the original string
- regex string
-
Regex to find substring to replace
- replacement string
-
the replacement string
-
Return Type
(string) the resultant string
Splits a string using the given delimiter.
Parameters
- receiver string
-
the original string
- delimiter string
-
delimiter to split by
-
Return Type
(string[]) array of strings containing the split individual strings