CTYPE(3) BSD Library Functions Manual CTYPE(3)NAME
digittoint, isalnum, isalpha, isascii, isblank, iscntrl, isdigit, isgraph, ishexnumber, isideogram, islower, isnumber, isphonogram, isprint,
ispunct, isrune, isspace, isspecial, isupper, isxdigit, toascii, tolower, toupper -- character classification macros
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <ctype.h>
int
digittoint(int c);
int
isalnum(int c);
int
isalpha(int c);
int
isascii(int c);
int
iscntrl(int c);
int
isdigit(int c);
int
isgraph(int c);
int
ishexnumber(int c);
int
isideogram(int c);
int
islower(int c);
int
isnumber(int c);
int
isphonogram(int c);
int
isspecial(int c);
int
isprint(int c);
int
ispunct(int c);
int
isrune(int c);
int
isspace(int c);
int
isupper(int c);
int
isxdigit(int c);
int
toascii(int c);
int
tolower(int c);
int
toupper(int c);
DESCRIPTION
The above functions perform character tests and conversions on the integer c. They are available as macros, defined in the include file
<ctype.h>, or as true functions in the C library. See the specific manual pages for more information.
Extended locale versions of these functions are documented in ctype_l(3). See xlocale(3) for more information.
SEE ALSO digittoint(3), isalnum(3), isalpha(3), isascii(3), isblank(3), iscntrl(3), isdigit(3), isgraph(3), isideogram(3), islower(3), isphonogram(3),
isprint(3), ispunct(3), isrune(3), isspace(3), isspecial(3), isupper(3), isxdigit(3), toascii(3), tolower(3), toupper(3), wctype(3),
ascii(7), ctype_l(3)STANDARDS
These functions, except for digittoint(), isascii(), ishexnumber(), isideogram(), isnumber(), isphonogram(), isrune(), isspecial() and
toascii(), conform to ISO/IEC 9899:1990 (``ISO C90'').
BSD March 30, 2004 BSD
Logic of code
if ( $var is a number ) {
Do something
}
else {
Do something else
}
My question is: How do I check if a variable is a number. All the reg ex that I came up with to match this is failing. Please help. (3 Replies)
Hello All,
I'm trying the following:find . -name "*" -exec grep -ln "IsAlpha" {} \;
It gives me file names only (having string "IsAlpha"), I want to get line numbers also, something like this: test 1: Line 52
test 1: Line 95 etc
Is it possible to obtain using grep & find only. (5 Replies)
Here's a program and its pretty simple .It requires file handling and some calculations but on running it I am not getting the required result.It seems that the code outside the file read's outer while loop is not executing e.g the print statement is not being printed.Plz Help!
#include<stdio.h>... (1 Reply)
i have written a program for creating an infix tree for the given expression.
the program is working fine if we give the expression completlely binded with operators and operands but when we ignore the brackets we need to consider the priority of the operators nad build the tree.
i am not... (1 Reply)
Hello All
in a text file I have to replace some numeric code by a string.
This is an exemple of the file:
000000001 LDR L ^^^^^nam^^2200169Ia^45e0
000000001 008 L 100604s9999^^^^xx^^^^^^^^^^^^000^0^und^d
000000001 022 L $$a0365-6675
000000001 090 L $$aBMA 1934-1937.
000000001 245... (1 Reply)
Hey all,
I have a very simple regular expression that I use when I want to allow only letters with spaces. (I know this regex has a lot of shortcomings, but I'm still trying to learn them)
isAlpha='^*$'However, when I bring this over to BASH it doesn't allow me to enter spaces.
I use the... (3 Replies)
i must close server after a specific user input, such as FINE, if i put a test inside function "maiuscolatore" i receive an error on second recv of client. why?
below there are code of client and server:
CLIENT:
#include <stdlib.h>
#include <stdio.h>
#include... (0 Replies)
The below bash is a file validation check executed that will verify the correct header count of 10 and the correct data type in each field of the tab-delimited file. The key has the data type of each field in it. My real data has 58 headers in it but only the header and next row need to be... (6 Replies)