1 /*
2 * sisnum.c
3 * al_sisnum
4 */
5
6
7 /*
8 This file is part of Atclib.
9
10 Atclib is Copyright � 1995-1999 Andr� Majorel.
11
12 This library is free software; you can redistribute it and/or
13 modify it under the terms of the GNU Library General Public
14 License as published by the Free Software Foundation; either
15 version 2 of the License, or (at your option) any later version.
16
17 This library is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Library General Public License for more details.
21
22 You should have received a copy of the GNU Library General Public
23 License along with this library; if not, write to the Free
24 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
25 02111-1307, USA.
26 */
27
28
29 #include <ctype.h>
30 #include "atclib.h"
31
32
al_sisnum(const char * str)33 int al_sisnum (const char *str)
34 {
35 if (! *str)
36 return 0; /* Empty string is not considered numeric */
37 while (*str)
38 if (! isdigit (*str++))
39 return 0;
40 return 1;
41 }
42
43 /* eof - sisnum.c */
44