O'Reilly logo

Learning WML, and WMLScript by Martin Frost

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

length — Return the length of a string

Usage

String.length(str)

str : String

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required