summaryrefslogtreecommitdiff
path: root/userland/libc/include/tb
diff options
context:
space:
mode:
Diffstat (limited to 'userland/libc/include/tb')
-rw-r--r--userland/libc/include/tb/sb.h4
-rw-r--r--userland/libc/include/tb/sv.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/userland/libc/include/tb/sb.h b/userland/libc/include/tb/sb.h
index 84f8161..06aa084 100644
--- a/userland/libc/include/tb/sb.h
+++ b/userland/libc/include/tb/sb.h
@@ -11,13 +11,15 @@ struct sb {
struct sv;
-void sb_init(struct sb *ctx);
+void sb_init(struct sb *ctx, size_t starting_capacity);
void sb_free(struct sb *ctx);
void sb_reset(struct sb *ctx);
int sb_isempty(const struct sb *ctx);
void sb_append_char(struct sb *ctx, char c);
int sb_delete_right(struct sb *ctx, size_t n);
void sb_append(struct sb *ctx, const char *s);
+void sb_append_buffer(struct sb *ctx, const char *buffer,
+ size_t length);
void sb_append_sv(struct sb *ctx, struct sv sv);
void sb_prepend_sv(struct sb *ctx, struct sv sv);
#endif
diff --git a/userland/libc/include/tb/sv.h b/userland/libc/include/tb/sv.h
index 54ec218..3d4f9fb 100644
--- a/userland/libc/include/tb/sv.h
+++ b/userland/libc/include/tb/sv.h
@@ -25,6 +25,7 @@ struct sv sv_skip_chars(const struct sv input, const char *chars);
struct sv sv_split_function(const struct sv input, struct sv *rest,
int (*function)(int));
struct sv sv_take(struct sv s, struct sv *rest, size_t n);
+struct sv sv_take_end(struct sv s, struct sv *rest, size_t n);
struct sv sv_next(struct sv s);
int sv_isempty(struct sv s);
char sv_peek(struct sv s);