Yes, in that feature request I wrote that strings should continue to terminate with a null character. They should only have an additional prefixed length field, so that the string functions don't have to calculate the string length again and again.mk-soft wrote: Sun Nov 13, 2022 6:49 pm The normal string functions are terminated with zero bytes. Like now with PB.
Yes, if with WinAPI function or with pointers directly the PB strings are modified, the PB string management gets nothing of it and the length field is not adapted then. That's why I suggested in my last post to introduce a new function UpdateStringLength() for this purpose, with which the length field can be updated manually (specifying the string length as parameter) or automatically (searches for the null character, like PeekS() but without creating a new string).mk-soft wrote: Sun Nov 13, 2022 6:49 pm If change to Type B-STR in PB, this leads of course to problems.
Or a new, additional string variable type is implemented, see also my last post. I think this is the cleanest solution. So there are then absolutely no problems with backward compatibility.
@juergenkulow:
Are you saying that PB strings on Linux are already prefixed with a string length field? Please explain more what you want to tell us.