Hanumanth Rao wrote:
I am using SysStringByIndex()api to get the string from StringList.
>>It is required to give Max string length as a parameter to this.
As Lengths of my string vcaries so much ,I do not want to specify a maximum
length for my destination string.
Can any body please tell me any APi which can be used to get the length of
the string at run time.

You can find this out by parsing the string list yourself. The first 2 bytes of a locked string list resource hold the # of strings in the list. The remaining bytes hold the list of null terminated strings.

Parsing the string list is a good idea. Note, however, that the very first thing in the string list resource ('tSTL') is a null-terminated "prefix" string, followed by the string count. So you have to skip over the prefix string first, and then the next two bytes (which contain the count) might not be on a word boundary.


-- Ken
--
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200

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

Reply via email to