Vikas-
    I'd do something like this:

char cString[100], cBeg[50], cEnd[50];
char *cPos;
int iDiff;

StrCopy( cString, "V0001~VIKAS");

//Parse out the first half of the string
cPos = StrStr( cString, "~" );
iDiff = (int) cPos - (int) cString;
StrNCopy( cBeg, cString, iDiff );
cBeg[ iDiff ] = '\0';

//Parse out the second half of the string
cPos++;
StrCopy( cEnd, cPos );


Someone may have a better way to manage this and obviously I'd love to hear
it, but this method has served me pretty well.
"V...i...K...a...S" <[EMAIL PROTECTED]> wrote in message
news:82116@palm-dev-forum...
>
> Hello All,
> I guess this problem everybody might have faced.
> I stroed records in the database as a
> Char *;
> Hence on quering the database i get a
> char * string as "V0001~VIKAS"
> Now I want to split up this string into 2 removing the '~' seperator.
> I have tried a lot of ways but am unsuccessful.
> Can anybody suggest me how to do this.
>
> Thx in advance ,
> Vikas
>
>
>
>



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

Reply via email to