Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

isspace

Array elements that are space characters

Syntax

tf = isspace('str')

Description

tf = isspace('str') returns an array the same size as 'str' containing logical 1 (true) where the elements of str are Unicode®-represented whitespace characters, and logical 0 (false) where they are not.

Whitespace characters for which isspace returns true include tab, line feed, vertical tab, form feed, carriage return, and space, in addition to a number of other Unicode characters. To see all characters for which isspace returns true, enter the following command, and then look up the returned decimal codes in a Unicode reference:

find(isspace(char(1):char(intmax('uint16'))))

Examples

isspace('  Find spa ces ')
  Columns 1 through 13 
     1   1   0   0   0   0   1   0   0   0   1   0   0
  Columns 14 through 15 
     0   1

Introduced before R2006a

Was this topic helpful?