aboutsummaryrefslogtreecommitdiff
path: root/lib/bob/u8strpushu8.c
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-03-10 15:08:10 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-03-10 15:08:10 +0200
commit791d6bc10ec81d08324807211d968d7e37110f0b (patch)
treeb38d150964199381d7e443975d375ba2a858f864 /lib/bob/u8strpushu8.c
parentd78cf57211f24aeebc5e2f30927e2410bf068983 (diff)
Remove Bob the String-Builder
Seeing as dynarr.h already exists, there is no real use for Bob the String-Builder. It was *a bit* nice because of the generic u8strpush() macro, but it should be very easy to implement yourself, and you only really ever need 1 or 2 specific functions that are a few lines of code each.
Diffstat (limited to 'lib/bob/u8strpushu8.c')
-rw-r--r--lib/bob/u8strpushu8.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/bob/u8strpushu8.c b/lib/bob/u8strpushu8.c
deleted file mode 100644
index 8358e01..0000000
--- a/lib/bob/u8strpushu8.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <string.h>
-
-#include "bob.h"
-#include "mbstring.h"
-
-struct u8str *
-u8strpushu8(struct u8str *b, struct u8view v)
-{
- if (!u8strgrow(b, b->len + v.len))
- return nullptr;
- memcpy(b->p + b->len, v.p, v.len);
- b->len += v.len;
- return b;
-}