summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
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 8c65b35..9fb078c 100644
--- a/util.h
+++ b/util.h
@@ -98,6 +98,8 @@ void strn_cpy(char *dst, size_t dst_sz, const char *src, size_t src_len);
void str_cpy(char *dst, size_t dst_sz, const char *src);
/// 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!!
+void str_binary_number(char s[65], u64 n);
/// print some bytes. useful for debugging.
void print_bytes(const u8 *bytes, size_t n);
/// like strstr, but case-insensitive