Functions like isgraph()

I have a method 'replaceStrChar' which replaces ',' by a space and ')' by 'U'. This method is called to modify 'textstr':

1
2
3
    textstr = replaceStrChar(textstr, ",", ' ');
    textstr = replaceStrChar(textstr, ")", 'U');
    text = textstr.c_str();


Then I have the function isgraph in some if-statements, which recognizes the spaces in 'text'.

1
2
3
4
5
6
 else if (!last && (isgraph((*text)&255) || *text == '_')) {
                for (temp = text, bufptr = buf;
                     (isgraph((*temp)&255) || *text == '_') && bufptr < (buf + sizeof(buf) - 1);
                     *bufptr++ = *temp++);
                
                if ((!isgraph((*temp)&255)) && *temp != '_') {


How can I add the conditionals so that the 'U' is also recognized in 'text'?
Last edited on
Topic archived. No new replies allowed.