1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<TITLE>ISSPACE Test for Space Characters in a String
</TITLE>
</HEAD>
<BODY>
<H2>ISSPACE Test for Space Characters in a String
</H2>
<P>
Section: <A HREF=sec_string.html> String Functions </A>
<H3>Usage</H3>
The <code>isspace</code> 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
<PRE>
x = isspace(s)
</PRE>
<P>
where <code>s</code> is a <code>string</code>. A blank character is considered
a space, newline, tab, carriage return, formfeed, and vertical
tab.
<H3>Example</H3>
A simple example of <code>isspace</code>:
<PRE>
--> 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
</PRE>
<P>
</BODY>
</HTML>
|