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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user