Parse the string yourself.
Here's a simple algorithm that could do it:
i=0
j=0
loop until strSource[i] = NULL
{
if strSource[i] = ','
{
j++
}
else
{
strStr[j][i] = strSource[i]
strStr[j][i+1] = NULL
}
i++
}
Make sure your target strings have adequate memory allocated to them,
otherwise the whole routine could blow up.
I'd also suggest getting a book that has some entry level C/C++ algorithms
in it. I don't have one in mind at the moment but there are several decent
ones out there I've used over the years.
----- Original Message -----
From: "prasad" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[EMAIL PROTECTED]>
Sent: Friday, February 15, 2002 12:56 PM
Subject: substring
> actually this is the function save the list items in one record with ","
seperator.
> forexample : the list items are 3.and save as "str1,str2,str3" as a one
record.
> now i want to retrive these record and set to list items.
> like str1
> str2
> str3.
> i retriev these record("str1,str2,str3") from database but i unable to
seperate these strings and set to list items.
> i use StrStr (CharPtr str,",") function for sbstring. but this is not
usefull.
> any one have idea please tell me.
>
> thanks.
> laxma.
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/