Core Function isEmptyOrNull

From Sputnik Wiki
Jump to: navigation, search
isEmptyOrNull( <expression> )

Contents

Description

Checks if a string is completely empty or if the variable is null or if the variable translates to false (zero) .

Parameters

expression

The string to evaluate.

Return Value

Success: Returns True if expression is empty.

Failure: Returns False if expression is not empty.

Example

Will return True;

$result = isEmptyOrNull("");
Println("Result:" , $result);

Will return True;

$result = isEmptyOrNull(0);
Println("Result:" , $result);

Will return True;

$result = isEmptyOrNull(null);
Println("Result:" , $result);

Will return True;

$result = isEmptyOrNull(0);
Println("Result:" , $result);

Will return False;

$result = isEmptyOrNull(1);
Println("Result:" , $result);

Will return False;

$result = isEmptyOrNull("The fuzzy blue sweaters...");
Println("Result:" , $result);
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox