string.lengthlength(string)
Function; returns the number of characters in the string specified by string, including spaces and control characters such as TAB and RETURN.
None.
This statement displays the number of characters in the string "Macro"&"media":
put ("Macro" & "media").length
-- 10
This statement checks whether the content of the field cast member Filename has more than 31 characters and if it does, displays an alert:
-- Lingo syntax
if member("Filename").text.length > 31 then
alert "That filename is too long."
end if
// JavaScript syntax
if (member("Filename").text.length > 31) {
alert("That filename is too long.");
}
chars(), offset() (string function)