isspace
Determine which character array elements are space characters
Syntax
TF = isspace(A)
Description
TF = isspace(
returns a logical arrayA
)TF
. IfA
is a character array, the elements ofTF
are logical1
(true
) where corresponding elements ofA
are space characters, and logical0
(false
) elsewhere.isspace
recognizes all Unicode®whitespace characters.
IfA
is not a character array, thenisspace
returns logical0
(false
).
Examples
Input Arguments
Tips
To find space characters within elements of a string array, use the
isstrprop
function.To find all characters for which
isspace
returns logical1
, use the code below. Then look up the returned decimal codes in a Unicode reference, such as theList ofUnicodecharacters.find(isspace(char(1):char(intmax('uint16'))))
Extended Capabilities
See Also
blanks
|char
|deblank
|is*
|isa
|ischar
|isletter
|isnumeric
|isstring
|isstrprop
|newline
|regexp
|string
|strip
|strtrim
Introduced before R2006a
Was this topic helpful?