aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib/text.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-01 14:05:10 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-01 14:05:10 -0400
commit4d59fc2987e52da0274e6b204a9d2885613f74b7 (patch)
tree8c262f99cb6ae9b550b9f8abf0ab0477044d087a /src/stdlib/text.h
parent7a2c99de74f5870e1dea5b59d049678ad0ef8e44 (diff)
Move patterns into a module
Diffstat (limited to 'src/stdlib/text.h')
-rw-r--r--src/stdlib/text.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/stdlib/text.h b/src/stdlib/text.h
index 4acca8a2..662c6e5f 100644
--- a/src/stdlib/text.h
+++ b/src/stdlib/text.h
@@ -50,6 +50,16 @@ Text_t Text$as_text(const void *text, bool colorize, const TypeInfo_t *info);
Text_t Text$quoted(Text_t str, bool colorize, Text_t quotation_mark);
PUREFUNC bool Text$starts_with(Text_t text, Text_t prefix);
PUREFUNC bool Text$ends_with(Text_t text, Text_t suffix);
+Text_t Text$without_prefix(Text_t text, Text_t prefix);
+Text_t Text$without_suffix(Text_t text, Text_t suffix);
+Text_t Text$replace(Text_t text, Text_t target, Text_t replacement);
+Text_t Text$translate(Text_t text, Table_t translations);
+bool Text$has(Text_t text, Text_t target);
+Array_t Text$split(Text_t text, Text_t delimiter);
+Array_t Text$split_any(Text_t text, Text_t delimiters);
+Closure_t Text$by_split(Text_t text, Text_t delimiter);
+Closure_t Text$by_split_any(Text_t text, Text_t delimiters);
+Text_t Text$trim(Text_t text, Text_t to_trim, bool left, bool right);
char *Text$as_c_string(Text_t text);
__attribute__((format(printf, 1, 2)))
public Text_t Text$format(const char *fmt, ...);