isEmpty

Summary

Checks if the string contains no characters.

Usage

public bool isEmpty()

Returns

A Boolean value indicating whether the string is empty: true if the string value contains zero characters or false if the string value contains at least one character.

Description

Checks if the string is empty (contains no characters).

Examples

Basic Usage
1
2
3
4
5
6
7
import System;
 
string empty = "";
string notEmpty = "foobar";
 
Console.log(empty.isEmpty());    // true
Console.log(notEmpty.isEmpty()); // false

Share

HTML | BBCode | Direct Link