Lingo Dictionary > L-N > length()

 

length()

Syntax

string.length
length(string)

Description

Function; returns the number of characters in the string specified by string, including spaces and control characters such as TAB and RETURN.

Example

This statement displays the number of characters in the string "Macro"&"media":

put ("Macro" & "media").length 
-- 10

Example

This statement checks whether the content of the field cast member File Name has more than 31 characters and if it does, displays an alert:

if member("File Name").text.length > 31 then 
	alert "That file name is too long."
end if"

See also

chars(), offset() (string function)