Re: [AD] length-restricted text routines |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Saturday 13 September 2008 09:24:39 pm Peter Wang wrote:
> Can anyone think of a good use for the _count versions of textprintf_*
> functions?
Some programming languages don't end strings with a NULL char and instead have
a length value (like D). Those languages would potentially make a copy to
pass to "normal" C string functions. Or if you only want to print a section
of a string, you can just add the offset to the pointer and adjust the length
accordingly, without having to copy. I could see it particularly being useful
for handling multi-line text.