Syntax
length =
len(
cfString |
otherObject )
stringLength =
len$(
pascalString |
container$$ )
Description
This function returns the length of a cfString, pascalString or container$$.
len can also be used with objects that respond to 'length' or 'count'. For example:
length = len( aString ) // same as AttributedStringLength( aString )
length = len( dta ) // same as DataLength( dta )
length = len( idxPath ) // same as IndexPathLength( idxPath )
count = len( array ) // same as ArrayCount( array )
count = len( dict ) // same as DictionaryCount( dict )
count = len( set ) // same as SetCount( set )
count = len( idxSet ) // same as IndexSetCount( idxSet )
Notes
- A Pascal string variable may have a maximum of 255 characters and each character must be a single byte.
Many unicode characters cannot be represented in a one byte, so a CFString is recommended for them.
- len$ must be used to retrieve a container's length.
Calling Container.c's internal functions ( Len_Ctnr and CtnrRequestedSize ) will fail ( sometimes silently ).
- A container's size is limited only by the memory available to the running user application.
See also
sizeof