Length

See Also: String Functions, String, String command, SizeOfString, SizeOfWString, VariantStringLength

Purpose

Length returns the number of code points in a string.

Return Type

Integer

Syntax

(Length( {string-value} ))

What It Does

Length returns the number of code points in {string-value}, including leading and trailing spaces, if present. Note that some characters (especially diacritics) are built up of multiple code points.

String  sMeasure

Integer iLength

 

Move " 2 4 6" to sMeasure

Move (Length(sMeasure)) to iLength

In this example, the length of string variable sMeasure (6) is moved to iLength

Notes

Integer iLength

Move (Length(Trim(Customer.Name))) to iLength