aboutsummaryrefslogtreecommitdiff
path: root/cstring/include/cstring.h
diff options
context:
space:
mode:
Diffstat (limited to 'cstring/include/cstring.h')
-rw-r--r--cstring/include/cstring.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cstring/include/cstring.h b/cstring/include/cstring.h
index de85b43..991d742 100644
--- a/cstring/include/cstring.h
+++ b/cstring/include/cstring.h
@@ -94,6 +94,8 @@
94 return (a.length == strlen(b)) && strncmp(a.str, b, a.length) == 0; \ 94 return (a.length == strlen(b)) && strncmp(a.str, b, a.length) == 0; \
95 } \ 95 } \
96 \ 96 \
97 static inline bool STRING##_empty(STRING a) { return a.length == 0; } \
98 \
97 static inline STRING STRING##_itoa(int n) { \ 99 static inline STRING STRING##_itoa(int n) { \
98 STRING str = (STRING){0}; \ 100 STRING str = (STRING){0}; \
99 const int written = snprintf(str.str, SIZE, "%d", n); \ 101 const int written = snprintf(str.str, SIZE, "%d", n); \