include: util: fix doxygen comment for utf8_trunc

Properly format code block

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
Benjamin Cabé 2025-06-12 14:32:05 +02:00 committed by Henrik Brix Andersen
commit f899ff2475

View file

@ -652,8 +652,9 @@ static inline int64_t sign_extend_64(uint64_t value, uint8_t index)
* truncated (by setting the NULL terminator) earlier by other means, that
* the string ends with a properly formatted UTF-8 character (1-4 bytes).
*
* @htmlonly
* Example:
*
* @code{.c}
* char test_str[] = "€€€";
* char trunc_utf8[8];
*
@ -663,7 +664,7 @@ static inline int64_t sign_extend_64(uint64_t value, uint8_t index)
* printf("Bad : %s\n", trunc_utf8); // €€<E282AC>
* utf8_trunc(trunc_utf8);
* printf("Truncated: %s\n", trunc_utf8); // €€
* @endhtmlonly
* @endcode
*
* @param utf8_str NULL-terminated string
*