Name
length — Return the length of a string
Usage
String.length(str)
: Stringstr
Description
Returns the number of characters in string
str
; returns invalid
if
str
can’t be converted to a string.
Examples
String.length("foo")
returns integer 3
String.length("")
returns integer 0
String.length(42)
returns integer 2
String.length(true)
returns integer 4
String.length(invalid)
returns invalid
Get Learning WML, and WMLScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.