• characterAt (String text, Integer index) : String
• contains (String text, String substring) : Boolean
• containsIgnoreCase (String text, String substring) : Boolean
• defaultIfNull (String value, String defaultValue) : String
• endsWith (String text, String substring) : Boolean
• endsWithIgnoreCase (String text, String substring) : Boolean
• equalsIgnoreCase (String text1, String text2) : Boolean
• formatString (String s, Integer len) : String
• formatStringAlignRight (String s, Integer len) : String
• indexOf (String text, String substring) : Integer
• indexOfIgnoreCase (String text, String substring) : Integer
• insert (String text, Integer index, String insertText) : String
• isEmpty (String value) : Boolean
• lastIndexOf (String text, String substring) : Integer
• lastIndexOfIgnoreCase (String text, String substring) : Integer
• length (String text) : Integer
• max (String List list) : String
• min (String List list) : String
• remove (String text, Integer startIndex, Integer endIndex) : String
• remove (String text, String substring) : String
• removeAll (String text, String substring) : String
• removeAllIgnoreCase (String text, String substring) : String
• removeIgnoreCase (String text, String substring) : String
• replace (String text, Integer startIndex, Integer endIndex, String replacement) : String
• replace (String text, String findText, String replacement) : String
• replaceAll (String text, String findText, String replacement) : String
• replaceAllIgnoreCase (String text, String findText, String replacement) : String
• replaceIgnoreCase (String text, String findText, String replacement) : String
• splitString (String text, String delimiter) : String List
• startsWith (String text, String substring) : Boolean
• startsWithIgnoreCase (String text, String substring) : Boolean
• substring (String text, Integer startIndex, Integer endIndex) : String
• substring (String text, Integer startIndex) : String
• toLowerCase (String text) : String
• toUpperCase (String text) : String
• trim (String text) : String
6.1. characterAt(String text, Integer index)
Returns the character at position index from text. The first character in text has the index 1. If index is less than 1 or greater than the length of text an exception is returned.
Syntax. characterAt (String text, Integer index) : String Parameters.
Name Type Description
text String Text to retrieve a single character from
index Integer Index of the wanted character
Examples.
characterAt("visual rules manual", 12) = "s"
characterAt("visual rules manual", 1) = "v"
characterAt("visual rules manual", 50) An exception is returned
6.2. contains(String text, String substring)
Checks if substring is contained in text.
Syntax. contains (String text, String substring) : Boolean Parameters.
Name Type Description
text String Text in which the substring should be searched
substring String Text to be searched
Examples.
contains("visual rules manual", "manual") = true contains("visual rules manual", "reference") = false contains("visual rules manual", "MANUAL") = false
6.3. containsIgnoreCase(String text, String substring)
Checks whether substring is contained in text (case insensitive)
Syntax. containsIgnoreCase (String text, String substring) : Boolean Parameters.
Name Type Description
text String Text in which the substring should be searched
Name Type Description
substring String Text to search for
Examples.
containsIgnoreCase("visual rules manual", "manual") = true containsIgnoreCase("visual rules manual", "reference") = false containsIgnoreCase("visual rules manual", "MANUAL") = true
6.4. defaultIfNull(String value, String defaultValue)
Returns a default value if the provided value is null. Otherwise the given value is returned.
Syntax. defaultIfNull (String value, String defaultValue) : String Parameters.
Name Type Description
value String Value to be checked
defaultValue String Default value to be set if value is null Examples.
defaultIfNull(null, "default") = "default"
defaultIfNull("test", "default") = "test"
6.5. endsWith(String text, String substring)
Checks if text ends with substring.
Syntax. endsWith (String text, String substring) : Boolean Parameters.
Name Type Description
text String Text
substring String Text to compare
Examples.
endsWith("visual rules manual", "manual") = true endsWith("visual rules manual", "reference") = false endsWith("visual rules manual", "MANUAL") = false endsWith("visual rules manual", "manual ") = false
6.6. endsWithIgnoreCase(String text, String substring)
Checks whether text ends with substring (case insensitive)
Syntax. endsWithIgnoreCase (String text, String substring) : Boolean Parameters.
Name Type Description
text String Text
substring String Text to compare
Examples.
endsWithIgnoreCase("visual rules manual", "MANUAL") = true endsWithIgnoreCase("visual rules manual", "reference") = false endsWithIgnoreCase("visual rules manual", "manual") = true endsWithIgnoreCase("visual rules manual", "manual ") = false endsWithIgnoreCase("visual rules MANUAL", "manual") = true
6.7. equalsIgnoreCase(String text1, String text2)
Checks if text1 is equal to text2 (case insensitive)
Syntax. equalsIgnoreCase (String text1, String text2) : Boolean Parameters.
Name Type Description
text1 String Text to be compared
text2 String Text to be compared
Examples.
equalsIgnoreCase("manual", "reference") = false equalsIgnoreCase("manual", "MANUAL") = true equalsIgnoreCase("manual", "manUAL") = true equalsIgnoreCase("manual", "REFERENCE") = false
6.8. formatString(String s, Integer len)
Returns a fixed length String. Missing characters are padded with whitespaces. Strings longer than the given length are truncated.
Syntax. formatString (String s, Integer len) : String Parameters.
Name Type Description
s String String
len Integer Length
Examples.
formatString("visual rules", 20) = "visual rules "
6.9. formatStringAlignRight(String s, Integer len)
Returns a fixed length String aligned right. Missing characters are padded with whitespaces. Strings longer than the given length are truncated.
Syntax. formatStringAlignRight (String s, Integer len) : String Parameters.
Name Type Description
s String String
len Integer Length
Examples.
formatStringAlignRight("visual rules", 20) = " visual rules"
6.10. indexOf(String text, String substring)
Returns the index of the first occurence of substring in text. The first character in text has the index 1. If substring is not contained in text, 0 is returned.
Syntax. indexOf (String text, String substring) : Integer Parameters.
Name Type Description
text String Text to be searched for the index of a substring
substring String The substring to find
Examples.
indexOf("visual rules manual", "visual rules") = 1 indexOf("visual rules manual", "manual") = 14 indexOf("visual rules manual", "visual RULES") = 0 indexOf("visual rules manual", "reference") = 0 indexOf("visual rules manual", " ") = 7
6.11. indexOfIgnoreCase(String text, String substring)
Returns the index of the first occurence of substring in text (case insensitive). The first charcacter in text has the index 1. If substring is not contained in text, 0 is returned.
Syntax. indexOfIgnoreCase (String text, String substring) : Integer Parameters.
Name Type Description
text String Text in which the index of some substring should be searched
Name Type Description
substring String Text to be searched for Examples.
indexOfIgnoreCase("visual rules manual", "visual rules") = 1 indexOfIgnoreCase("visual rules manual", "manual") = 14 indexOfIgnoreCase("visual rules manual", "visual RULES") = 1
indexOfIgnoreCase("visual rules manual / visual rules reference", "visual RULES") = 1 indexOfIgnoreCase("visual RULES manual / MANUAL visual rules ", "MANUAL") = 14 indexOfIgnoreCase("visual rules manual", "REFERENCE") = 0
6.12. insert(String text, Integer index, String insertText)
Inserts a substring into text at position index. If index is less than 1 or greater than the length of text an exception is returned.
Syntax. insert (String text, Integer index, String insertText) : String Parameters.
Name Type Description
text String Text in which a substring should be inserted index Integer Index at which to insert the substring
insertText String Text to be inserted
Examples.
insert("visual rules example", 14; "ejb-") = "visual rules ejb-example"
insert("visual rules example", 50; "modelling-") An exception is returned insert("visual rules example", 21; "-ejb") = "visual rules example-ejb"
6.13. isEmpty(String value)
Checks whether a String is NULL or only contains whitespaces.
Syntax. isEmpty (String value) : Boolean Parameters.
Name Type Description
value String String value to be checked.
Examples.
isEmpty("") = true isEmpty("abc") = false isEmpty(" ") = true
isEmpty(" abc ") = false
6.14. lastIndexOf(String text, String substring)
Returns the index of the last occurence of substring in text. The first character in text has the index 1. If substring is not contained in text, 0 is returned.
Syntax. lastIndexOf (String text, String substring) : Integer Parameters.
Name Type Description
text String Text in which the index of some substring should be searched substring String The substring to search for
Examples.
lastIndexOf("visual rules manual", "visual rules") = 1 lastIndexOf("visual rules manual", "manual") = 14 lastIndexOf("visual rules manual", "visual RULES") = 0
lastIndexOf("visual rules manual / visual rules reference", "visual rules") = 23 lastIndexOf("visual rules manual / visual rules reference", " ") = 35
6.15. lastIndexOfIgnoreCase(String text, String substring)
Returns the index of the last occurrence of substring in text (case insensitive). The first character in text has the index 1. If substring is not contained in text 0 is returned.
Syntax. lastIndexOfIgnoreCase (String text, String substring) : Integer Parameters.
Name Type Description
text String Text in which the index of the substring should be searched
substring String Text to be searched
Examples.
lastIndexOfIgnoreCase("visual rules manual", "visual rules") = 1 lastIndexOfIgnoreCase("visual rules manual", "manual") = 14 lastIndexOfIgnoreCase("visual rules manual", "visual RULES") = 1
lastIndexOfIgnoreCase("visual rules manual / visual rules reference", "visual RULES") = 23 lastIndexOfIgnoreCase("visual RULES manual / visual rules reference", "VISUAL RULES") = 23 lastIndexOfIgnoreCase("visual rules manual", "REFERENCE") = 0
6.16. length(String text)
Returns the length of text in characters.
Syntax. length (String text) : Integer Parameters.
Name Type Description
text String Text for which the length should be calculated Examples.
length("visual rules") = 12
6.17. max(String List list)
Returns the maximum element of a collection Syntax. max (String List list) : String Parameters.
Name Type Description
list String List List to check
Examples.
max({"1","8","2"}) = "8"
max({"foo","bar","fooo"}) = "fooo"
6.18. min(String List list)
Returns the minimal element of a collection Syntax. min (String List list) : String Parameters.
Name Type Description
list String List List to check
Examples.
min({"1","8","2"}) = "1"
min({"foo","bar","fooo"}) = "bar"
6.19. remove(String text, Integer startIndex, Integer endIndex)
Removes the substring starting at startIndex (inclusive) up to endIndex (exclusive) from text. If startIndex is less than 1 or greater than the length of text, or if endIndex is less than startIndex an exception is returned. If endIndex is greater than the length of text +1, the substring from startIndex up to the end of text is removed. If startIndex and endIndex are equal, nothing is removed.
Syntax. remove (String text, Integer startIndex, Integer endIndex) : String Parameters.
Name Type Description
text String Text from which some substring should be removed startIndex Integer Start of the substring (including) which should be removed endIndex Integer End of the substring (including) which should be removed Examples.
remove("visual rules example", 1, 14); = "example"
remove("visual rules example", 50, 70) An exception is returned remove("visual rules example", 10, 5) An exception is returned
6.20. remove(String text, String substring)
Removes the first occurence of substring from text. If substring is not contained in text, nothing will be removed.
Syntax. remove (String text, String substring) : String Parameters.
Name Type Description
text String Text from which a substring should be removed
substring String Substring to be removed
Examples.
remove("visual rules example", "visual rules ") = "example"
remove("visual rules ruletree1 / visual rules ruletree2", "visual rules ") = "ruletree1 / visual rules ruletree2"
remove("visual rules example", "reference" = "visual rules example"
remove("visual rules example", "EXAMPLE" = "visual rules example"
6.21. removeAll(String text, String substring)
Removes all occurences of substring from text. If substring is not contained in text, nothing is removed.
Syntax. removeAll (String text, String substring) : String Parameters.
Name Type Description
text String Text to remove substring from
substring String Text to be removed
Examples.
removeAll("visual RULES example", "visual rules ") = "visual RULES example"
removeAll("visual rules ruletree1 / visual RULES ruletree2", "visual RULES ") = "visual rules ruletree1 / ruletree2"
removeAll("visual rules example / visual rules ruletree1", "visual rules ") = "example / ruletree1"
removeAll("visual rules example", "REFERENCE") = "visual rules example"
6.22. removeAllIgnoreCase(String text, String substring)
Removes all occurences of substring (case insensitive) from text. If substring is not contained in text, nothing is removed.
Syntax. removeAllIgnoreCase (String text, String substring) : String Parameters.
Name Type Description
text String Text to remove substring from
substring String Text to be removed
Examples.
removeAllIgnoreCase("visual RULES example", "visual rules ") = "example"
removeAllIgnoreCase("visual rules ruletree1 / visual RULES ruletree2", "visual RULES ") = "ruletree1 / ruletree2"
removeAllIgnoreCase("visual rules example", "EXAMPLE") = "visual rules "
removeAllIgnoreCase("visual rules example", "REFERENCE") = "visual rules example"
6.23. removeIgnoreCase(String text, String substring)
Removes the first occurence of substring (case insensitive) from text. If substring is not contained in text, nothing is removed.
Syntax. removeIgnoreCase (String text, String substring) : String Parameters.
Name Type Description
text String Text to delete substring from
substring String Text to be removed
Examples.
removeIgnoreCase("visual RULES example", "visual rules ") = "example"
removeIgnoreCase("visual rules ruletree11 / visual RULES ruletree2", "visual RULES ") = "ruletree1 / visual RULES ruletree2"
removeIgnoreCase("visual rules example", "EXAMPLE") = "visual rules "
removeIgnoreCase("visual rules example", "REFERENCE") = "visual rules example"
6.24. replace(String text, Integer startIndex, Integer endIndex, String replacement)
Replaces the substring starting at startIndex (inclusive) up to endIndex (exclusive) in text with some new text.
The first character in text has the index 1. If startIndex is less than 1 or greater than the length of text, or if endIndex is less than startIndex, no replacement will be made. If endIndex is greater than the length of text + 1,
the substring starting at startIndex up to the end of text is replaced. If startIndex is equal to endIndex, the new text is inserted at startIndex, and no substring will be deleted.
Syntax. replace (String text, Integer startIndex, Integer endIndex, String replacement) : String
Parameters.
Name Type Description
text String String in which some substring should be replaced startIndex Integer Start of the substring (including) to be replaced endIndex Integer End of the substring (excluding) to be replaced replacement String Text to be inserted in place of the (deleted) substring Examples.
replace("visual rules reference", 14, 23, "manual") = "visual rules manual"
replace("visual rules reference", 1, 14, "") = "reference"
replace("visual rules reference", 15, 5, "manual") No replacements will be made: = "visual rules reference"
replace("visual rules reference", 14, 50, "manual") = "visual rules manual"
6.25. replace(String text, String findText, String replacement)
Replaces the first occurence of findText in text with the new substring replacement. If findText is not contained within text, text is returned.
Syntax. replace (String text, String findText, String replacement) : String Parameters.
Name Type Description
text String String in which some substring should be replaced findText String Text to be replaced (first occurence only)
replacement String Text to be inserted instead of the (found) <i>findText</i>
Examples.
replace("visual rules reference", "reference", "manual") = "visual rules manual"
replace("visual rules manual and visual rules reference", "visual rules ", "") = "manual and visual rules reference"
replace("visual rules manual and visual rules reference", "visual rules", "Content") = "Content manual and visual rules reference"
6.26. replaceAll(String text, String findText, String replacement)
Replaces every occurence of findText in text with replacement. If findText is not contained in text, text is returned.
Syntax. replaceAll (String text, String findText, String replacement) : String Parameters.
Name Type Description
text String String in which some substring should be replaced
findText String Text to be replaced
replacement String Text to be inserted instead of the (found) <i>findText</i>
Examples.
replaceAll("visual rules reference", "reference", "manual") = "visual rules manual"
replaceAll("VISUAL RULES manual and visual rules reference", "visual rules ", "") = "VISUAL RULES manual and reference"
replaceAll("visual rules reference", "manual", "reference") = "visual rules reference"
6.27. replaceAllIgnoreCase(String text, String findText, String replacement)
Replaces all occurences of findText in text with replacement (case insensitive). If findText is not contained in text, text is returned.
Syntax. replaceAllIgnoreCase (String text, String findText, String replacement) : String
Parameters.
Name Type Description
text String String in which some substring should be replaced
findText String Text to be replaced
replacement String Text to be inserted instead of the (found) <i>findText</i>
Examples.
replaceAllIgnoreCase("visual rules reference", "REFERENCE", "manual") = "visual rules manual"
replaceAllIgnoreCase("VISUAL RULES manual and visual rules reference", "visual rules ", "Content") = "Content manual and Content reference"
replaceAllIgnoreCase("visual rules reference", "manual", "reference") = "visual rules reference"
6.28. replaceIgnoreCase(String text, String findText, String replacement)
Replaces findText in text with replacement, non case sensitive. If findText is not contained in text, text is returned.
Syntax. replaceIgnoreCase (String text, String findText, String replacement) : String
Parameters.
Name Type Description
text String String in which to replace a substring findText String Text to be replaced (first occurence only)
replacement String Text to be inserted instead of the (found) <i>findText</i>
Examples.
replaceIgnoreCase("visual rules reference", "REFERENCE", "manual") = "visual rules manual"
replaceIgnoreCase("VISUAL RULES manual and visual rules reference", "visual rules", "") = " manual and visual rules reference"
replaceIgnoreCase("visual rules reference", "manual", "reference") = "visual rules reference"
6.29. splitString(String text, String delimiter)
Breaks a string into tokens using the given delimiter
Syntax. splitString (String text, String delimiter) : String List Parameters.
Name Type Description
text String String to split into tokens
delimiter String Delimiter
6.30. startsWith(String text, String substring)
Checks if text starts with substring.
Syntax. startsWith (String text, String substring) : Boolean Parameters.
Name Type Description
text String Text
substring String Text to compare
Examples.
startsWith("visual rules manual", "visual rules") = true startsWith("visual rules manual", "VISUAL RULES") = false startsWith("VISUAL rules manual", "visual rules") = false startsWith("visual rules manual", "manual ") = false startsWith("visual rules MANUAL", "visual rules ") = true
6.31. startsWithIgnoreCase(String text, String substring)
Checks whether text starts with substring (case insensitive)
Syntax. startsWithIgnoreCase (String text, String substring) : Boolean Parameters.
Name Type Description
text String Text
substring String Substring to compare
Examples.
startsWithIgnoreCase("visual rules manual", "visual rules") = true startsWithIgnoreCase("visual rules manual", "VISUAL RULES") = true startsWithIgnoreCase("VISUAL rules manual", "visual rules") = true startsWithIgnoreCase("visual rules manual", "manual ") = false startsWithIgnoreCase("visual rules MANUAL", "manual ") = false
6.32. substring(String text, Integer startIndex, Integer endIndex)
Copies the substring between the indices startIndex (inclusive) and endIndex (exclusive) from text. The first character in text has the index 1. If startIndex is less than 1 or greater than the length of text, or endIndex is less than startIndex, an empty String is returned. If endIndex is greater than the length of text + 1, the substring starting at startIndex up to the end of text is returned. If startIndex and endIndex are equal, an empty String is returned.
Syntax. substring (String text, Integer startIndex, Integer endIndex) : String Parameters.
Name Type Description
text String String to copy some substring out of
startIndex Integer Index to start copying from (including) endIndex Integer Index to end copying (excluding) Examples.
substring("visual rules reference", 14, 17) = "ref"
substring("visual rules reference", 12, 80) = "reference"
substring("visual rules reference", 14, 15) = "r"
substring("visual rules reference", 12, 12) = ""
substring("visual rules reference", 12, 10) = ""
substring("visual rules reference", 50, 60) = ""
6.33. substring(String text, Integer startIndex)
Copies the substring from index startIndex (inclusive) to the end of the String from text. The first character in text has the index 1. If startIndex is less than 1 or greater than the length of text an empty String is returned.
Syntax. substring (String text, Integer startIndex) : String Parameters.
Name Type Description
text String String to copy substring from
startIndex Integer Starting index (including) Examples.
substring("visual rules reference", 14) = "reference"
substring("visual rules reference", 19) = "ence"
substring("visual rules reference", 1) = "visual rules reference"
substring("visual rules reference", 50 = ""
6.34. toLowerCase(String text)
Converts text to lower case letters.
Syntax. toLowerCase (String text) : String Parameters.
Name Type Description
text String Text to be converted
Examples.
toLowerCase("visual RULES") = "visual rules"
toLowerCase("VISUAL RULES") = "visual rules"
6.35. toUpperCase(String text)
Converts text to upper case letters.
Syntax. toUpperCase (String text) : String Parameters.
Name Type Description
text String Text to be converted
Examples.
toUpperCase("visual rules") = "VISUAL RULES"
toUpperCase("visual RULES") = "VISUAL RULES"
6.36. trim(String text)
Removes leading and trailing blanks from a given String.
Syntax. trim (String text) : String Parameters.
Name Type Description
text String Input String
Examples.
trim(" visual rules ") = "visual rules"