summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-09-09 21:19:26 -0400
committerpommicket <pommicket@gmail.com>2023-09-09 21:19:26 -0400
commit16fbe87451b0ca3e8fa35fd04e0afbfab368ea65 (patch)
treedcd4c1e37b4a89173e23047f644df94a9ca92399 /util.h
parent0dcfd5a4f1fd865c24c01b17b214e1f72e4c06fe (diff)
fix handling of TextEdit[]
i hate microsoft so much
Diffstat (limited to 'util.h')
-rw-r--r--util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/util.h b/util.h
index 97db6fd..edbcbe3 100644
--- a/util.h
+++ b/util.h
@@ -103,6 +103,8 @@ void str_trim_start(char *str);
void str_trim_end(char *str);
/// trim whitespace from both sides of a string
void str_trim(char *str);
+/// count occurences of `c` in `s`
+size_t str_count_char(const char *s, char c);
/// 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!!