Decompose utils from duox-related code

This commit is contained in:
kormax committed 2026-05-05 18:27:19 +03:00
1 parent ab4eda6ce5
commit 1167bd9701
7 files changed
+304 -283

No files matched your search

+15
View File
@@ -215,4 +215,19 @@ uint8_t get_highest_frequency(const uint8_t *d, uint8_t n);
size_t unduplicate(uint8_t *d, size_t n, const uint8_t item_n);
/**
* @brief Trim leading and trailing ASCII whitespace from a mutable string.
*/
void str_trim_ascii_inplace(char *s);
/**
* @brief Replace escaped \n, \r, and \t sequences with their control characters in-place.
*/
void str_unescape_newlines_inplace(char *s);
/**
* @brief Copy a string while dropping all ASCII whitespace characters.
*/
int str_copy_without_whitespace(const char *src, char *dst, size_t dst_size, size_t *dst_len);
#endif