FreeMat

- Main Page
- Related Pages

ISSPACE Test for Space Characters in a String

Section: String Functions

# Usage

The `isspace` functions returns a logical array that is 1 for characters in the argument string that are spaces, and is a logical 0 for characters in the argument that are not spaces. The syntax for its use is

       x = isspace(s)

where `s` is a `string`. A blank character is considered a space, newline, tab, carriage return, formfeed, and vertical tab.

# Example

A simple example of `isspace`:

    --> isspace('  hello there world ')

    ans =
     1 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1