String routines
Looking for the documentation on the newest versions of SIL Engine and the Simple Issue Language for Jira 8 for Server/Data Center? Click here !
This section contains routines that enable users to handle strings.
Routines summary
- escapeHtml
- base64Decode — Decodes from Base64. This is useful when transferring data like retrieving images stored in a database.
- base64Encode — Encodes text in Base64. This is useful when transferring data like attaching a signature to the bottom of an email or storing images in a database.
- chop — Returns a string, chopped at nmb characters. Cuts down the string (if length is greater than nmb characters) to a string of max nmb chars.
- contains — Returns true if character expression str2 is in character expression str1.
- endsWith — Returns true if str1 ends with str2.
- executeTemplate — Executes a template. All variables already defined in the script are passed to that template.
- hashString — Returns a consistent hash to be used across systems. The hash is not guaranteed to be unique (i.e. two strings s1 != s2 may have the same hash).
- indexOf — Returns the index of the first match of the str2 in str1 or -1 if str2 is nowhere to be found in str1.
- isAlpha — Returns "true" if the provided argument str is a string containing only letters.
- isAlphaNumeric — Returns "true" if the provided argument str is a string containing only letters and digits.
- isDigit — Returns "true" if the provided argument str is a string containing only digits.
- isLower — Returns "true" if the provided argument str is a string containing only lowercase letters.
- isNumeric — Returns "true" if the provided argument str is actually a number.
- isUpper — Returns "true" if the provided argument str is a string containing only upper letters.
- join — Returns the string obtained by concatenating all the strings from the array using the provided delimiter.
- lastIndexOf — Returns the index of the last match of the str2 in str1 or -1 if str2 is nowhere to be found in str1.
- length — Returns the length of the provided string, 0 if the string is null or has no chars.
- matchEnd — Returns the position where the match ends or -1 if it doesn't match.
- matches — Returns "true" if character expression string matches the regular expression regex.
- matchReplace — Uses a regex expression to find and replace text within a string.
- matchStart — Returns the position where the match starts or -1 if it doesn't match.
- matchText — Returns the text matched or empty string if it doesn't match.
- replace — Replaces the search_str string with replacement_str in str and returns the resulting string. The string str is not modified.
- split — Returns the array of strings computed by splitting this string around matches of the given regular expression.
- startsWith — Returns "true" if str1 starts with str2.
- substring — Returns substring is starting at index start and stop at index stop.
- toLower — Returns the string only with lower case letters.
- toUpper — Returns the string only with upper case letters.
- trim — Returns a trimmed copy of the string passed as parameter with the leading and trailing whitespaces removed.
- urlDecode — Decodes text from URL format. This is useful when parsing a URL address used by a REST command.
- urlEncode — Encodes text in URL format. This is useful when constructing a URL address used by a REST command.