Is there a way to declare ranges for conditional testing, like [A-Z] or [0-9] ?
Basically I want to turn any char that is not a letter into a space by saying something like:
instead of (mostly b/c I get the warning that char constant is too long for its type):Code:if ( c != [A-Z] || c != [a-z]) { c = ' '} return c;
Code:int replacenum ( int c) { if ( c=='1'||c=='2'||c=='3')||c=='4'||c=='5'||c=='6'||c=='7'|| c=='8'||c=='9'||c=='0'||c=='`'||c=='~'||c=='!'||c=='@'|| c=='#'||c=='$'||c=='%'||c=='^'||c=='&'||c=='*'||c=='('|| c==')'||c=='-'||c=='_'||c=='+'||c=='='||c=='{'||c=='['|| c=='}'||c==']'||c=='|'||c=='\')//||c==':'||c==';'|| ... ) { c = ' '; } return c; }



LinkBack URL
About LinkBacks


