length
length ( aString : string ) : integer
| Parameter | Type | Description | |
|---|---|---|---|
| aString | string | → | String for which to return length |
| Result | integer | ← | Length of string |
Description
length is used to find the length of a aString. length returns the number of characters that are in a aString..
note
When you want to check whether a string contains any characters, including ignorable characters, you must use the test if(length(vtAnyText) == 0) rather than if(vtAnyText == ""). If the string contains for example char(1), which is an ignorable character, length(vtAnyText) does return 1 but vtAnyText == "" returns true.
Example
var vtResult : string
vlResult = length("Topaz") // vlResult gets 5
vlResult = length("Citizen") // vlResult gets 7