From 791d6bc10ec81d08324807211d968d7e37110f0b Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 10 Mar 2024 15:08:10 +0200 Subject: 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. --- lib/bob/u8strpushr.c | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 lib/bob/u8strpushr.c (limited to 'lib/bob/u8strpushr.c') diff --git a/lib/bob/u8strpushr.c b/lib/bob/u8strpushr.c deleted file mode 100644 index 6fe5fd9..0000000 --- a/lib/bob/u8strpushr.c +++ /dev/null @@ -1,11 +0,0 @@ -#include "bob.h" -#include "mbstring.h" - -struct u8str * -u8strpushr(struct u8str *b, rune ch) -{ - if (!u8strgrow(b, b->len + rtou8(nullptr, ch, 0))) - return nullptr; - b->len += rtou8(b->p + b->len, ch, b->cap - b->len); - return b; -} -- cgit v1.2.3