length (string)
length (string)
The length (string) task counts the number of characters in a given string and returns the count.
The length of an empty string is 0.
Potential use case
This task specifies the maximum number of characters allowed for a string property. For example, to verify that a user provided exactly three characters (such as ATL, HNL, or LHR) for an airport code on an entry form, use length (string) to get the character count in the user-provided string. Additional logic applied elsewhere in the workflow can then compare that count to the acceptable value.
Properties
Example
In this example:
- The
strvariable is statically set to12 Dollars And 43 Cents. - The outgoing
lengthvalue is23, representing the total number of characters counted.
