What I am doing is: Char *posC; char *urlStr; Char *data;
posC = StrStr (urlStr, "?"); StrCopy(data,urlStr+(posC-urlStr+1));
Now I would like to remove the "?" and anything beyond it. I cannot have any NULL characters in the urlStr because this is a WAP POST (and the WAP specs say no NULLs in the URL).
You don't have NUL characters in strings. C strings are terminated by the NUL character, so setting a NUL in the middle of the string just serves to shorten it. You could write:
char *posP = StrChr (urlStr, '?'); if (posP) *posP = 0;
and get the results you want.
-- Ben Combee, senior DTS engineer, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
