Name
isEmpty — Return true if a string is the empty string
Usage
String.isEmpty(str)
: Stringstr
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
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.