How about?
len = StrLen(recP->Labels);
for (n = 0; n < len; n++)
{
if (recP->Labels[n] == '~') {
recP->Labels[n] = '\0';
}
}
Usually you need to add an addition '\0' at end of
a '\0' separated string.
Regards
horace
"Gabriel Covert" <[EMAIL PROTECTED]> wrote in message
news:46821@palm-dev-forum...
Due to constraints in the API I must write a list of strings that will
populate a List control in the form this~is~the~string~for~values\0, instead
of this\0is\0the\0string\0for\0values\0.
My question is, how can I translate the ~-delimited string on the client
into the \0-delimited string? I've tried the following code:
for (n = 0; n < StrLen(recP->Labels); n++)
{
cTemp = recP->Labels[n];
if (cTemp == '~')
StrCat(sTemp, "\0");
else
StrCat(sTemp, &cTemp);
}
but this doens't actually concatenate the \0, it just skips over it. Any
help would be greatly appreciated!
Gabe Covert
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/