core: Avoid trivial snprintfs.

This commit is contained in:
2025-06-10 21:17:55 -04:00
parent 3a2a829940
commit b135a210cc
13 changed files with 96 additions and 74 deletions

View File

@ -233,4 +233,13 @@ bool tf_util_is_mobile();
*/
uint32_t tf_util_fnv32a(const void* buffer, int length, uint32_t start);
/**
** Populate a string buffer, truncating if necessary.
** @param buffer The buffer.
** @param size The size of the buffer.
** @param string The value to set.
** @return The number of bytes set, not including the NULL terminator.
*/
size_t tf_string_set(char* buffer, size_t size, const char* string);
/** @} */