feat: add str trim

This commit is contained in:
2025-08-23 17:09:54 +02:00
parent ca04e8898e
commit bdaffdda54
3 changed files with 40 additions and 0 deletions

View File

@@ -72,4 +72,12 @@ void str_to_lower(char* str);
*/
char* str_concat(const char* str1, const char* str2);
/**
* @brief Trim leading and trailing whitespace characters from a string.
* @param str Null-terminated input string (must not be NULL).
* @return A newly allocated string with leading and trailing whitespace removed.
* The caller is responsible for freeing the allocated memory.
*/
char* str_trim(const char* str);
#endif //TSTD_STRING_H