sv: add a few more functions

* alisp.org: reset state of Unit tests to TODO

* alisp.org: take sv_t tasks out of the backlog and set to WIP

* sv: add prototypes for sv_chop_{left,right} and sv_substr

* sv: implement sv_chop_{left, right} and sv_substr

* sv: sv_till and sv_while

* sv: add sv_truncate

When you just want to decrease to a specific size, sv_chop_right is a
bit cumbersome.

* alisp.org: Update and adjust
This commit is contained in:
2026-02-06 07:02:10 +00:00
committed by GitHub
parent a65964e2f7
commit a6d3d861b7
3 changed files with 74 additions and 11 deletions

View File

@@ -26,6 +26,13 @@ typedef struct
// String view functions
sv_t sv_copy(sv_t);
sv_t sv_chop_left(sv_t, u64 size);
sv_t sv_chop_right(sv_t, u64 size);
sv_t sv_substr(sv_t, u64 position, u64 size);
sv_t sv_truncate(sv_t, u64 newsize);
sv_t sv_till(sv_t, const char *reject);
sv_t sv_while(sv_t, const char *accept);
#endif