"But what happens to the string itself? This could lead in a high memory usage. "
this code is
NOT for clearing all strings out of memory but ONLY the string pointers.
Example: You create a text. Now every stringpointer have a random value which don't leads to an string (because the strings aren't created with the texts) and this will lead to an empty pointer message if you try to access one of those pointers.
This function is to intializie a text. After this function GEditTextGetString(TEXT* txt,var num) will return 0 if a string don't exists.
For removing strings use:
DLLFUNC var GEditTextRemoveString(TEXT* txt,var num)
{
if(txt->strings <= num) { return(_VAR(-1)); }
str_remove(txt->string[_INT(num)]);
txt->string[_INT(num)] = 0;
return(_VAR(1));
}
BTW: Thanks a lot for the code above.. saved me some writing-work
