isSpace

Syntax

isSpace(X)

Details

Check whether the string X consists of only space. Return "true" if all characters in X are space, "\t" (tab), "\r" (carriage return) or "\n" (newline escape).

Parameters

X is a STRING scalar or vector.

Returns

  • When X is a scalar, it returns a Boolean scalar.
  • When X is a vector, it returns a Boolean vector.
  • When X is a table, it returns a table.

Examples

isSpace("hello world");
// output: false

isSpace(" \t ");
// output: true

isSpace(string());
// output: false