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

isEmpty — Return true if a string is the empty string

Usage

String.isEmpty(str)

str : String

Description

Returns true if str converts to the empty string; returns false if it converts to a nonempty string; returns invalid if it can’t be converted to a string.

Examples

String.isEmpty("")

returns boolean true

String.isEmpty("foo")

returns boolean false

String.isEmpty(123)

returns boolean false

String.isEmpty(true)

returns boolean false

String.isEmpty(2.3)

returns boolean false

String.isEmpty(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