StrFormat appears to have length limitations

i am working on a library to partially implement python lists in AFL. While debugging, i found out that StrFormat statements similar to the following...

function AddListDelimiters(list) { return StrFormat("%s%s%s", LeftListDelimiter,list,RightListDelimiter); }

silently quit working when the string length grows larger than about 1024 characters. The function still returns a string, but not what one would expect. If i replace that code with string addition, for example...

function AddListDelimiters(list) { return LeftListDelimiter + list + RightListDelimiter; }

things work as expected. i have tested this with strings up to 30k length.

regards,

PS... if u do not want posts like this just say so and i will stop posting them. If you berate me or delete the post i will assume this is true.

StrFormat for speed uses fixed size buffer (no memory allocations/deallocations and no memory fragmentation). And this fixed buffer has size of 1024 bytes.
If you need to concatenate strings, you should use + operator, not StrFormat. StrFormat as it name says is for formatting numbers to strings.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.