A89: A C question


[Prev][Next][Index][Thread]

A89: A C question



Hmm, any thoughts as to why this doesn't work?  I am trying to strip off the '(' character at the end of the string by writing a null character over it, but when I try the code, it leaves the '(' character at the end.  Anyway, I have some other code that does basically the same thing, and it does work, and I can't figure out why this doesn't work.

EVENT *ev;

......

if(ev->extra.pasteText[strlen(ev->extra.pasteText)-1] == '(')
{
    ev->extra.pasteText[strlen(ev->extra.pasteText)-1] = '\0';
    printf("%s",ev->extra.pasteText);
    ngetchx();
}


Follow-Ups: