String Functions
This document provides a reference for all built-in string functions available in OpenDataDSL.
capitalise(str)
Category: Strings
Description: Returns a Capitalised string.
Parameters:
str(String) - The string to capitalise
Returns: String
capitaliseFully(str)
Category: Strings
Description: Returns a Capitalised string of all the words.
Parameters:
str(String) - The string to capitalise
Returns: String
clean(str)
Category: Strings
Description: Creates a valid variable name from the input string - spaces converted to underscores and invalid characters removed
Parameters:
str(String) - The string to clean
Returns: String
compare(str1, str2)
Category: Strings
Description: Compares the contents of 2 non-null strings, returns true if they are the same
Parameters:
str1(String) - The string to comparestr2(String) - The string to compare to
Returns: Boolean
concatenate(str1, str2)
Category: Strings
Description: Joins 2 non-null strings together
Parameters:
str1(String) - The left part of the string to concatenatestr2(String) - The right part of the string to concatenate
Returns: String
contains(str1, str2)
Category: Strings
Description: Returns true if a string contains another string
Parameters:
str1(String) - The string to search instr2(String) - The string to search for
Returns: Boolean
encodeBase64(content)
Category: Strings
Description: Encode Base64.
Parameters:
content(String) - The content to use
Returns: String
encodeURI(uri)
Category: Strings
Description: Encode URI.
Parameters:
uri(String) - The uri to use
Returns: String
endsWith(str, suffix)
Category: Strings
Description: Tests to see if the first string ends with the specified suffix. If either the string or the suffix are null, it returns false
Parameters:
str(String) - The string to checksuffix(String) - The suffix to check for
Returns: Boolean
equals(str1, str2)
Category: Strings
Description: Checks to see if 2 strings are the same
Parameters:
str1(String) - The string to comparestr2(String) - The string to compare to
Returns: Boolean
equals()
Category: Strings
Description:
Parameters:
Returns:
equalsIgnoreCase(str1, str2)
Category: Strings
Description: Checks to see if 2 strings are the same ignoring case
Parameters:
str1(String) - The string to comparestr2(String) - The string to compare to
Returns: Boolean
formatString(format, str)
Category: Strings
Description: Formats the string passed using the formatter.
Parameters:
format(String) - The format to usestr(String) - The string to format
Returns: String
indexOf(str1, str2)
Category: Strings
Description: Returns a int value that is a indexOf of a string.
Parameters:
str1(String) - The string which contains the charstr2(String) - The string to find the indexOf value
Returns: int