You could use StrStr to find the substring, copy it to your new string and
then terminate the new string with NULL so it doesn't contain extra
characters.

NewStringPtr = StrStr(StringToSearch,StringToken);
if(NewStringPtr != NULL)
    {
    StrCopy(NewString,NewStringPtr);
    NewString[StrLen(StringToken)] = NULL;
    }

or something like that.

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Monday, October 23, 2000 10:33 AM
Subject: How do I extract a string from another string ??


> Hello all,
>
>
> Could you help me, please!!!
>
>
> I need to  extract  a string from another string .
>
> In the Language c , c++ , simple using  the sentence substring(string 1,
string 2, position)  solve this issue
>
> How do I do this using Code Warrior????
>
> Environment:  Palm Vx, Code Warrior 6.0
>
> Regards,
> Marco
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
>


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to