Re: Bounds Checking

From: Tooie (zyrenthian@home.com)
Date: 08/19/99


you could alway try using
if(isalpha(*arg) || *arg == '0')

there is also another function you may want to look into and that is
strspn

something like
if( (strspn(arg,<array of valid values>)>0)

Tooie

>I need to do some bounds checking where the valid values
>are the number 0, and the lower case letters a-z. (upper
>case letters are converted prior to entering this function so
>I do not need to worry about that)
>
>I currently use (if arg && *arg) but this is letting thru
>values such as -1.
>
>
>I've never used it but there is a regex library which will do all of
>your regular expression matching. As far as syntax and the actual code, I
>can't help you with that.
>
>Rich


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST