xref: /netbsd-src/lib/libc/gen/isspace.3 (revision cda4f8f6ee55684e8d311b86c99ea59191e6b74f)
1.\" Copyright (c) 1991 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" the American National Standards Committee X3, on Information
6.\" Processing Systems.
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\"    notice, this list of conditions and the following disclaimer in the
15.\"    documentation and/or other materials provided with the distribution.
16.\" 3. All advertising materials mentioning features or use of this software
17.\"    must display the following acknowledgement:
18.\"	This product includes software developed by the University of
19.\"	California, Berkeley and its contributors.
20.\" 4. Neither the name of the University nor the names of its contributors
21.\"    may be used to endorse or promote products derived from this software
22.\"    without specific prior written permission.
23.\"
24.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE.
35.\"
36.\"     from: @(#)isspace.3	5.3 (Berkeley) 7/31/91
37.\"	$Id: isspace.3,v 1.2 1993/07/30 08:37:34 mycroft Exp $
38.\"
39.Dd July 31, 1991
40.Dt ISSPACE 3
41.Os
42.Sh NAME
43.Nm isspace
44.Nd white-space character test
45.Sh SYNOPSIS
46.Fd #include <ctype.h>
47.Ft int
48.Fn isspace "int c"
49.Sh DESCRIPTION
50The
51.Fn isspace
52function tests for the standard white-space characters
53.\" or for any
54.\" of an implementation-defined set of characters
55for which
56.Xr isalnum 3
57is false.
58The standard white-space characters are the following:
59.Pp
60.Bl -tag -width xxxxx -offset indent -compact
61.It Sq \0
62Space character.
63.It Li \ef
64Form feed.
65.It Li \en
66New-line.
67.It Li \er
68Carriage return.
69.It Li \et
70Horizontal tab.
71.It Li \ev
72And vertical tab.
73.El
74.Pp
75In the
76.Em ``C''
77locale,
78.Fn isspace
79returns true only for the standard white-space characters.
80.Sh RETURN VALUES
81The
82.Fn isspace
83macro returns zero if the character tests false and
84returns non-zero if the character tests true.
85.Sh SEE ALSO
86.Xr isascii 3 ,
87.Xr isalnum 3 ,
88.Xr isalpha 3 ,
89.Xr iscntrl 3 ,
90.Xr isdigit 3 ,
91.Xr isgraph 3 ,
92.Xr islower 3 ,
93.Xr isprint 3 ,
94.Xr ispunct 3 ,
95.Xr isupper 3 ,
96.Xr isxdigit 3 ,
97.Xr toascii 3 ,
98.Xr tolower 3 ,
99.Xr toupper 3 ,
100.Xr stdio 3
101.Xr ascii 7
102.Sh STANDARDS
103The
104.Fn isspace
105function conforms to
106.St -ansiC .
107