Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the 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?