xref: /dragonfly/lib/libc/locale/isdigit.3 (revision c66c7e2f)
10d5acd74SJohn Marino.\" Copyright (c) 1991, 1993
20d5acd74SJohn Marino.\"	The Regents of the University of California.  All rights reserved.
30d5acd74SJohn Marino.\"
40d5acd74SJohn Marino.\" This code is derived from software contributed to Berkeley by
50d5acd74SJohn Marino.\" the American National Standards Committee X3, on Information
60d5acd74SJohn Marino.\" Processing Systems.
70d5acd74SJohn Marino.\"
80d5acd74SJohn Marino.\" Redistribution and use in source and binary forms, with or without
90d5acd74SJohn Marino.\" modification, are permitted provided that the following conditions
100d5acd74SJohn Marino.\" are met:
110d5acd74SJohn Marino.\" 1. Redistributions of source code must retain the above copyright
120d5acd74SJohn Marino.\"    notice, this list of conditions and the following disclaimer.
130d5acd74SJohn Marino.\" 2. Redistributions in binary form must reproduce the above copyright
140d5acd74SJohn Marino.\"    notice, this list of conditions and the following disclaimer in the
150d5acd74SJohn Marino.\"    documentation and/or other materials provided with the distribution.
16*c66c7e2fSzrj.\" 3. Neither the name of the University nor the names of its contributors
170d5acd74SJohn Marino.\"    may be used to endorse or promote products derived from this software
180d5acd74SJohn Marino.\"    without specific prior written permission.
190d5acd74SJohn Marino.\"
200d5acd74SJohn Marino.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
210d5acd74SJohn Marino.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
220d5acd74SJohn Marino.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
230d5acd74SJohn Marino.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
240d5acd74SJohn Marino.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
250d5acd74SJohn Marino.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
260d5acd74SJohn Marino.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
270d5acd74SJohn Marino.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
280d5acd74SJohn Marino.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
290d5acd74SJohn Marino.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
300d5acd74SJohn Marino.\" SUCH DAMAGE.
310d5acd74SJohn Marino.\"
320d5acd74SJohn Marino.\"     @(#)isdigit.3	8.1 (Berkeley) 6/4/93
330d5acd74SJohn Marino.\" $FreeBSD: head/lib/libc/locale/isdigit.3 233992 2012-04-07 09:05:30Z joel $
340d5acd74SJohn Marino.\"
354e81684dSSascha Wildner.Dd December 25, 2013
360d5acd74SJohn Marino.Dt ISDIGIT 3
370d5acd74SJohn Marino.Os
380d5acd74SJohn Marino.Sh NAME
39382f042fSSascha Wildner.Nm isdigit , isdigit_l , isnumber , isnumber_l
400d5acd74SJohn Marino.Nd decimal-digit character test
410d5acd74SJohn Marino.Sh LIBRARY
420d5acd74SJohn Marino.Lb libc
430d5acd74SJohn Marino.Sh SYNOPSIS
440d5acd74SJohn Marino.In ctype.h
450d5acd74SJohn Marino.Ft int
460d5acd74SJohn Marino.Fn isdigit "int c"
470d5acd74SJohn Marino.Ft int
480d5acd74SJohn Marino.Fn isnumber "int c"
494e81684dSSascha Wildner.Ft int
504e81684dSSascha Wildner.Fn isdigit_l "int c" "locale_t locale"
51382f042fSSascha Wildner.In xlocale.h
520d5acd74SJohn Marino.Ft int
534e81684dSSascha Wildner.Fn isnumber_l "int c" "locale_t locale"
540d5acd74SJohn Marino.Sh DESCRIPTION
550d5acd74SJohn MarinoThe
560d5acd74SJohn Marino.Fn isdigit
574e81684dSSascha Wildnerand
584e81684dSSascha Wildner.Fn isdigit_l
594e81684dSSascha Wildnerfunctions test for a decimal digit character.
600d5acd74SJohn MarinoRegardless of locale, this includes the following characters only:
610d5acd74SJohn Marino.Bl -column \&``0''______ \&``0''______ \&``0''______ \&``0''______ \&``0''______
620d5acd74SJohn Marino.It "\&``0''" Ta "``1''" Ta "``2''" Ta "``3''" Ta "``4''"
630d5acd74SJohn Marino.It "\&``5''" Ta "``6''" Ta "``7''" Ta "``8''" Ta "``9''"
640d5acd74SJohn Marino.El
650d5acd74SJohn Marino.Pp
660d5acd74SJohn MarinoThe
670d5acd74SJohn Marino.Fn isnumber
684e81684dSSascha Wildnerand
694e81684dSSascha Wildner.Fn isnumber_l
704e81684dSSascha Wildnerfunctions behave similarly to
714e81684dSSascha Wildner.Fn isdigit
724e81684dSSascha Wildnerand
734e81684dSSascha Wildner.Fn isdigit_l ,
740d5acd74SJohn Marinobut may recognize additional characters, depending on the current locale
750d5acd74SJohn Marinosetting.
760d5acd74SJohn Marino.Pp
770d5acd74SJohn MarinoThe value of the argument must be representable as an
780d5acd74SJohn Marino.Vt "unsigned char"
790d5acd74SJohn Marinoor the value of
800d5acd74SJohn Marino.Dv EOF .
810d5acd74SJohn Marino.Pp
824e81684dSSascha WildnerThe _l-suffixed versions take an explicit
834e81684dSSascha Wildner.Fa locale
844e81684dSSascha Wildnerargument, whereas the
850d5acd74SJohn Marinonon-suffixed versions use the current global or per-thread locale.
860d5acd74SJohn Marino.Sh RETURN VALUES
870d5acd74SJohn MarinoThe
884e81684dSSascha Wildner.Fn isdigit ,
894e81684dSSascha Wildner.Fn isdigit_l ,
904e81684dSSascha Wildner.Fn isnumber ,
910d5acd74SJohn Marinoand
924e81684dSSascha Wildner.Fn isnumber_l
930d5acd74SJohn Marinofunctions return zero if the character tests false and
940d5acd74SJohn Marinoreturn non-zero if the character tests true.
950d5acd74SJohn Marino.Sh COMPATIBILITY
960d5acd74SJohn MarinoThe
970d5acd74SJohn Marino.Bx 4.4
980d5acd74SJohn Marinoextension of accepting arguments outside of the range of the
990d5acd74SJohn Marino.Vt "unsigned char"
1000d5acd74SJohn Marinotype in locales with large character sets is considered obsolete
1010d5acd74SJohn Marinoand may not be supported in future releases.
1020d5acd74SJohn MarinoThe
1034e81684dSSascha Wildner.Fn iswdigit ,
1044e81684dSSascha Wildner.Fn iswdigit_l ,
1054e81684dSSascha Wildner.Fn iswnumber ,
1064e81684dSSascha Wildnerand
1074e81684dSSascha Wildner.Fn iswnumber_l
1084e81684dSSascha Wildnerfunctions should be used instead.
1090d5acd74SJohn Marino.Sh SEE ALSO
1100d5acd74SJohn Marino.Xr ctype 3 ,
111382f042fSSascha Wildner.Xr ctype_l 3 ,
1120d5acd74SJohn Marino.Xr iswdigit 3 ,
1134e81684dSSascha Wildner.Xr iswdigit_l 3 ,
1140d5acd74SJohn Marino.Xr multibyte 3 ,
1150d5acd74SJohn Marino.Xr xlocale 3 ,
1160d5acd74SJohn Marino.Xr ascii 7
1170d5acd74SJohn Marino.Sh STANDARDS
1180d5acd74SJohn MarinoThe
1190d5acd74SJohn Marino.Fn isdigit
1200d5acd74SJohn Marinofunction conforms to
1210d5acd74SJohn Marino.St -isoC .
1220d5acd74SJohn MarinoThe
1230d5acd74SJohn Marino.Fn isdigit_l
1240d5acd74SJohn Marinofunction conforms to
1250d5acd74SJohn Marino.St -p1003.1-2008 .
1260d5acd74SJohn Marino.Sh HISTORY
1270d5acd74SJohn MarinoThe
1280d5acd74SJohn Marino.Fn isnumber
1290d5acd74SJohn Marinofunction appeared in
1300d5acd74SJohn Marino.Bx 4.4 .
131