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.


Array elements that are space characters


tf = isspace('str')


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:



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?