Livecode Wiki
Advertisement

Returns the number of characters in a string.

Built-in Function handler[]

Syntax:

Put length(<string>)

Examples:

the length of "ABC" -- returns 3
repeat with x = 1 to the length of receivedData
  ...
End repeat
put char (length(it) - 3) to (length(it)) of it into myExtension

Use the length function to find out how many characters are in a string, in order to process each character.

The length of a string is the number of characters in the string. The expression the length of string is equivalent to

   the number of chars in string 


If the string is empty, its length is zero.

Parameters:

See also: number (function),begins with (operator),ends with (operator),number (property),

Advertisement