Re: GREP
- From: CBFalconer <cbfalconer@xxxxxxxxx>
- Date: Wed, 23 Jan 2008 21:05:01 -0500
Malcolm McLean wrote:
.... snip ...
The standard can fix that
int testtext(char *str) {
while(*str) {
if(!isalpha( (unsigned int) *str) && !isspace( (unsigned int) *str))
return 0;
str++;
}
return 1;
}
To the OP, sorry about the horrid casts to int. They are needed
to fix up problems in the is.... functions when passed negative
chars.
Try simply receiving str as an unsigned char*
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
--
Posted via a free Usenet account from http://www.teranews.com
.
- Follow-Ups:
- Re: GREP
- From: Malcolm McLean
- Re: GREP
- Prev by Date: Re: Is Chris Hills a troll?
- Next by Date: Re: fread()
- Previous by thread: Re: GREP
- Next by thread: Re: GREP
- Index(es):
Relevant Pages
|