diff options
author | pommicket <pommicket@gmail.com> | 2023-07-18 16:32:29 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-07-18 16:32:29 -0400 |
commit | 8f2258fcce0d3bd5e6cf1364bd58669391fbab7c (patch) | |
tree | e8bdc9ea407237beabd8f1c5b9b5307cc14beb6c /util.h | |
parent | 2d2f0a09b180cf3bd6a2bc0ad3d21ea956398822 (diff) |
start "multifonts"
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -96,6 +96,12 @@ void str_cat(char *dst, size_t dst_sz, const char *src); void strn_cpy(char *dst, size_t dst_sz, const char *src, size_t src_len); /// a safer version of strcpy. `dst_sz` includes a null-terminator. void str_cpy(char *dst, size_t dst_sz, const char *src); +/// trim whitespace from the start of a string +void str_trim_start(char *str); +/// trim whitespace from the end of a string +void str_trim_end(char *str); +/// trim whitespace from both sides of a string +void str_trim(char *str); /// equivalent to GNU function asprintf (like sprintf, but allocates the string with malloc). char *a_sprintf(const char *fmt, ...); /// convert binary number to string. make sure `s` can hold at least 65 bytes!! |