From e16792d5eb76326634cb1ad0b21301ec693fccb3 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 9 Sep 2024 05:31:25 -0400 Subject: Add Text.starts_with() and Text.ends_with() --- test/text.tm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/text.tm') diff --git a/test/text.tm b/test/text.tm index bf7b77cd..216e5aaf 100644 --- a/test/text.tm +++ b/test/text.tm @@ -275,6 +275,16 @@ func main(): >> "A=B=C=D":replace($/{..}={..}/, "1:(\1) 2:(\2)") = "1:(A) 2:(B=C=D)" + >> "abcde":starts_with("ab") + = yes + >> "abcde":starts_with("bc") + = no + + >> "abcde":ends_with("de") + = yes + >> "abcde":starts_with("cd") + = no + do: !! Testing concatenation-stability: >> ab := Text.from_codepoint_names(["LATIN SMALL LETTER E", "COMBINING VERTICAL LINE BELOW"]) -- cgit v1.2.3