Processing TEXT* pstring array

Posted By: Aku_Aku

Processing TEXT* pstring array - 04/29/19 16:09

A TEXT* can contain more than one string, for example 8 pieces.
The documentation writes this about the stored strings:
Code:
STRING*	*pstring;	// pointer to array of string pointers


The txt_load function is able to fill such TEXT with series of strings, and only one TEXT will be filled.
How can i process each of the strings in a loop?

Or i misunderstood something, and there is only one string that is delimited inside with CR+LF characters?

I investigated more this situation. It turned out there is really only one string that is delimited inside with CR+LF characters. So, maybe i will delete this post.
This is more complex than i thought. Especially when changed from UTF-8 to UTF-16 LE.
OK, i stop now.
Posted By: Ayumi

Re: Processing TEXT* pstring array - 04/29/19 22:05

The strings are assigned automatically, also the delimiting by file_str_read.
You just need to set the count of strings.

(count of lines = count of stings)

TEXT* txt = txt_create(...,countOfLinesInTextFile);
txt_load(txt,...);
© 2020 lite-C Forums