i = length(string_expression);
The function length
calculates the length of an alphanumeric string_expression
. If the string is a dictionary item, the value returned is the length of the item. If it the string is the result of a function, the value returned is the length of the string returned by the function.
The function returns the length of the string as an integer value. If using an alpha
variable or a dictionary item, you may want to strip
the string before calculating its length.
function also operates on lists and arrays. When applied to a list, it returns the number of elements in the list. When applied on an array, it returns the size of an array dimension.