When the argument is a string, temporarily converts the string from Unicode to DBCS based on the current locale, then calculates its length in bytes. When the argument is a blob, no conversion takes place.
LenA (stringorblob)
Argument |
Description |
---|---|
stringorblob |
The string or blob for which you want the length in number of bytes |
Long. Returns a long whose value is the length of stringorblob if it succeeds and -1 if an error occurs. If stringorblob is null, Len returns null.
LenA replaces the functionality that Len had in DBCS environments in PowerBuilder 9.
In SBCS environments, Len, LenW, and LenA return the same results.
If you specify a size when you declare a blob, that is the size reported by LenA. If you do not specify a size for the blob, LenA initially reports the blob’s length as 0. PowerBuilder assigns a size to the blob the first time you assign data to the blob. LenA reports the length of the blob as the number of single-byte characters it can contain. Len and LenW report the size of the blob as the number of double-byte characters it can contain.