diff options
author | Anton Kling <anton@kling.gg> | 2024-12-11 14:48:15 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-12-11 14:48:15 +0100 |
commit | b343b0dae5aa51b5bd9b195936358341a943b3b2 (patch) | |
tree | 85b088fef86f9d0724a98202260fb58048b6d096 /kernel/lib/sv.h | |
parent | 916aa42260290e9e864304bc7d9395b6aa693c27 (diff) |
kernel: Add more sv functions and change interfaces
Diffstat (limited to 'kernel/lib/sv.h')
-rw-r--r-- | kernel/lib/sv.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/lib/sv.h b/kernel/lib/sv.h index b5cb0c9..bd556d4 100644 --- a/kernel/lib/sv.h +++ b/kernel/lib/sv.h @@ -28,6 +28,7 @@ struct sv sv_split_space(const struct sv input, struct sv *rest); 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)); +int sv_try_eat(struct sv input, struct sv *rest, struct sv b); 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); @@ -39,5 +40,5 @@ struct sv sv_trim_left(struct sv s, size_t n); struct sv sv_clone(struct sv s); struct sv sv_clone_from_c(const char *s); char *sv_copy_to_c(struct sv s, char *out, size_t buffer_length); -uint64_t sv_parse_unsigned_number(struct sv input, struct sv *rest); +uint64_t sv_parse_unsigned_number(struct sv input, struct sv *rest, int *got_num); #endif |