isWhitespace

Summary

Checks if the string is composed entirely of whitespace characters.

Usage

public bool isWhitespace()

Returns

true if the string is composed entirely of whitespace characters; false otherwise.

Description

Checks if the string is composed entirely of whitespace characters. Valid whitespace characters include spaces, tabs, line breaks, form feeds, and empty strings.

Examples

Basic Usage
1
2
3
4
import System;
 
bool whitespace1 = "       ".isWhitespace(); // true
bool whitespace2 = "     a ".isWhitespace()  // false

Share

HTML | BBCode | Direct Link