Thank you very much for your help. It worked. I also now know what Palm
Source meant when they said StrStr and StrChr returned a pointer. For some
bizarre reason I got a different impression on what a pointer was %-(. And
congrats on your job at Palm Source.

Regards,
Donald

"Ben Combee" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> At 07:00 PM 4/6/2004, you wrote:
> >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/

Reply via email to