Subj : string comparison To : borland.public.cpp.borlandcpp From : "Base8" Date : Mon Nov 24 2003 05:25 am Is there a simple way to do this? Any help appreciated. My intention is to look at the first character of a passed string and verify that it contains either an upper or lower case alpha ( >= a && <= z ) and ( >= A && <= Z ). So, I figure I'd do a case insensitive comparison on the string and simply test for zero (i.e. below). Well, no dice. I'm sure I've seen this, I just can't put my fingers on it. newstring = new char[ sizeof(passedstring + 1 )] ; assert( newstring != 0 ) ; if(strlen(passedstring) >= 5 && strlen(passedstring) <= 8 ) { strcpy(newstring, passedstring) ; return 0 ; } if( strncmpi(passedstring,(>="a" & <="z"),1)==0 ) <-------here { return 0 ; } else return -1 ; .