Count Text Characters
Verb: getStringLength
Counts the characters of a text, returning the total amount.
Syntax
getStringLength --text(String) (Numeric)=value
Inputs
Script | Designer | Required | AcceptedTypes | Description |
---|---|---|---|---|
--text | Text | Required | Text | Text of which the number of characters is counted. |
Outputs
Script | Designer | AcceptedTypes | Description |
---|---|---|---|
value | Length | Number | Number of characters counted from Text. |
Example
Gets the amount of characters contained in the text "Leader in Intelligent Automation".
defVar --name inputText --type String --value "Leader in Intelligent Automation."
defVar --name textLength --type Numeric
// Count the characters of the input text.
getStringLength --text "${inputText}" textLength=value
logMessage --message "${textLength}" --type "Info"
// This example produces the following result:
// 75
Remarks
All character types are considered in Count Text Characters, including numbers, special characters, spacing, and tabs.