String Commands (Template Language)
Command | Result Type | Description |
---|---|---|
Concat(...texts:String) | String |
Concatenates multiple string parameters into a single string. Parameters: A comma-separated list of string values to concatenate. Example: |
Contains(target:String, text:String) | Boolean |
Checks if the target string contains the specified text. Parameters: The target string to search within, and the text to search for. Example: |
EndsWith(target:String, text:String) | Boolean |
Checks if the target string ends with the specified text. Parameters: The target string to check, and the text to verify at the end of the target string. Example: |
FirstCharToLower(target:String) | String |
Converts the first character of the target string to lowercase. Parameter: The target string whose first character will be converted to lowercase. Example: |
FirstCharToUpper(target:String) | String |
Converts the first character of the target string to uppercase. Parameter: The target string whose first character will be converted to uppercase. Example: |
Follows(target:String, text1:String, text2:String, [text3:String]) | Boolean |
Returns true if Parameters: The target string to search within, the first text to locate, the second text that should follow the first, and an optional third text that should not appear between the first and second texts. Example: |
GetPlural(target:String) | String |
Returns a plural form of the target string based on simple heuristic rules. Parameter: The target string to pluralize. Example: |
IsBlank(target:String) | Boolean |
Returns true if the target string is null, empty, contains only whitespace, or is not evaluated. Parameter: The target string to check. Example: |
IsEmpty | Boolean |
Returns true if the target string is null, empty, or not evaluated. Parameter: The target string to check. Example: |
Join(separator:String, ...texts:String) | String |
Joins multiple strings using the provided separator. Parameters: The separator string to use between each text, followed by a comma-separated list of strings to join. Example: |
Length(target:String) | Number |
Returns the length of the target string. Parameter: The target string whose length will be returned. Example: |
Regex(target:String, regexPattern:String) | Boolean |
Performs a regular expression search within the target string based on the provided pattern. Parameters: The target string to search within, and the regex pattern to match against the target. Example: |
RemoveEnd(target:String, text:String, caseSensitive:Boolean) | String |
Removes the specified text from the end of the target string if it matches. The operation can be case-sensitive or case-insensitive based on the provided boolean value. Parameters: The target string from which to remove text, the text to remove, and a boolean indicating whether the removal should be case-sensitive ( Example: |
RemoveSpaces(target:String) | String |
Removes all spaces from the target string. Parameter: The target string from which spaces will be removed. Example: |
RemoveStart(target:String, text:String, caseSensitive:Boolean) | String |
Removes the specified text from the start of the target string if it matches. The operation can be case-sensitive or case-insensitive based on the provided boolean value. Parameters: The target string from which to remove text, the text to remove, and a boolean indicating whether the removal should be case-sensitive ( Example: |
Replace(target:String, oldText:String, newText:String) | String |
Replaces all occurrences of Parameters: The target string to modify, the text to be replaced, and the text to replace with. Example: |
ResetUniqueNames | Void |
Clears the unique names collection, resetting the state for generating unique names. |
StartsWith(target:String, text:String) | Boolean |
Checks if the target string starts with the specified text. Parameters: The target string to check, and the text to verify at the start of the target string. Example: |
Substring(target:String, index:Number, [length:Number]) | String |
Extracts a substring from the target string starting at the specified index. If Parameters: The target string, the starting index (zero-based), and an optional length of the substring. Example: |
ToLower(target:String) | String |
Converts the entire target string to lowercase letters. Parameter: The target string to convert. Example: |
ToSingleLine(target:String) | String |
Removes all line breaks from the target string, converting it to a single line of text. Parameter: The target string from which line breaks will be removed. Example: |
ToUpper(target:String) | String |
Converts the entire target string to uppercase letters. Parameter: The target string to convert. Example: |
Trim(target:String) | String |
Removes leading and trailing whitespace from the target string. Parameter: The target string to trim. Example: |
UniqueName(target:String) | String |
Returns the input string if it is unique within the current context; otherwise, it appends an index number to make it unique. The target string is added to the unique names collection after using this command. Parameter: The target string to ensure uniqueness for. Example: If |
New Comment