From b0faa5adc2c5f56ae50cf21f855fa6805db926cf Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 19 Dec 2024 13:50:35 -0500 Subject: Add Text:from()/to() and Array:slice() for symmetry --- stdlib/text.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'stdlib/text.h') diff --git a/stdlib/text.h b/stdlib/text.h index b493f4ae..6e2ac413 100644 --- a/stdlib/text.h +++ b/stdlib/text.h @@ -29,6 +29,8 @@ Text_t Text$_concat(int n, Text_t items[n]); #define Text$concat(...) Text$_concat(sizeof((Text_t[]){__VA_ARGS__})/sizeof(Text_t), (Text_t[]){__VA_ARGS__}) #define Texts(...) Text$concat(__VA_ARGS__) Text_t Text$slice(Text_t text, Int_t first_int, Int_t last_int); +Text_t Text$from(Text_t text, Int_t first); +Text_t Text$to(Text_t text, Int_t last); Text_t Text$cluster(Text_t text, Int_t index_int); OptionalText_t Text$from_str(const char *str); OptionalText_t Text$from_strn(const char *str, size_t len); -- cgit v1.2.3