summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-07-18 16:32:29 -0400
committerpommicket <pommicket@gmail.com>2023-07-19 19:02:27 -0400
commit8d7f6dea1113f48f812f734b4bba510ef35b3f27 (patch)
treeca67375c4def9f7780388b58d3a44092ecab20db /util.h
parent94a6d21d4c2fe5fc2806cd28ae36a2b0e1928914 (diff)
start "multifonts"
Diffstat (limited to 'util.h')
-rw-r--r--util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/util.h b/util.h
index 15181bc..1278e87 100644
--- a/util.h
+++ b/util.h
@@ -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!!