String-Related Functions
Function
Signature
Meaning
Availability
concat
String concat(Object...)
Converts all parameters to strings and concatenates them to a single result string.
Codebeamer 5.4 and later
contains
boolean contains(String text, String part)
Tests, if the specified text contains the specified part.
Codebeamer 5.4 and later
containsIgnoreCase
boolean containsIgnoreCase(String text, String part)
Tests, if the specified text contains the specified part, irrespective of case.
Codebeamer 5.4 and later
endsWith
boolean endsWith(String text, String suffix)
Tests if the specified text ends with the specified suffix.
Codebeamer 5.4 and later
escapeXml
String escapeXml(String text)
Escapes characters with a special meaning in XML with appropriate escape sequences.
Codebeamer 5.4 and later
format
String format(String pattern, Object... args)
Create a string representation of the specified arguments using a MessageFormat pattern.
Codebeamer 5.4 and later
indexOf
int indexOf(String text, String part)
Finds the first index of the specified part within text, or -1 if not found.
Codebeamer 5.4 and later
join
String join(String[] array, String separator)
Joins the elements of the provided array into a single String, separated by the separator.
Codebeamer 5.4 and later
length
int length(Object)
Returns the length of the passed string, or the number of elements of the passed array or collection.
Codebeamer 5.4 and later
printf
String printf(String format, Object... args)
Create a string representation of the specified arguments using a printf like format.
Codebeamer 5.4 and later
replace
String replace(String text, String replace, String replacement)
Replaces a String with another String inside a larger String.
Codebeamer 5.4 and later
split
String[] split(String text, String separator)
Splits the provided text into an array (at each occurence of the separator).
Codebeamer 5.4 and later
startsWith
boolean startsWith(String text, String prefix)
Tests if the specified text starts with the specified prefix.
Codebeamer 5.4 and later
substring
String substring(String text, int start, int end)
Gets a substring from the specified String, from the start position (inclusive) to the end position (exlusive).
Codebeamer 5.4 and later
substringAfter
String substringAfter(String text, String separator)
Gets the substring after the first occurrence of the separator.
Codebeamer 5.4 and later
substringBefore
String substringBefore(String text, String separator)
Gets the substring before the first occurrence of the separator.
Codebeamer 5.4 and later
substringBetween
String substringBetween(String text, String open, String close)
Gets the substring after the first occurrence of the open string and before the occurance of the close string.
Codebeamer 5.4 and later
toLowerCase
String toLowerCase(String text)
Converts a String to lower case.
Codebeamer 5.4 and later
toUpperCase
String toUpperCase(String text)
Converts a String to upper case.
Codebeamer 5.4 and later
trim
String trim(String text)
Removes leading and trailing whitespace.
Codebeamer 5.4 and later
Functions for Random String Generation
Function
Signature
Meaning
Availability
randomString
String randomString(int length)
Creates a random string whose length is the number of characters specified.
Codebeamer 9.3.0 and later
randomAscii
String randomAscii(int length)
Creates a random string whose length is the number of characters specified and that only contains ASCII characters [32 .. 126]
Codebeamer 9.3.0 and later
randomAlphabetic
String randomAlphabetic(int length)
Creates a random string whose length is the number of characters specified and that only contains alphabetic characters.
Codebeamer 9.3.0 and later
randomAlphanumeric
String randomAlphanumeric(int length)
Creates a random string whose length is the number of characters specified and that only contains alpha-numeric characters.
Codebeamer 9.3.0 and later
randomNumeric
String randomNumeric(int length)
Creates a random string whose length is the number of characters specified and that only contains numeric characters.
Codebeamer 9.3.0 and later
The case of function names is significant. Using the fn: prefix is optional when referring to functions.
Examples:
concat(customField[3], " ", customField[4], " has downloaded and installed codeBeamer.")
fn:format("{0,date,yyyy-MM-dd HH:mm}", submittedAt)
Was this helpful?