diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-09 05:31:25 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-09 05:31:25 -0400 |
| commit | e16792d5eb76326634cb1ad0b21301ec693fccb3 (patch) | |
| tree | 99e5b5c53db39e173db2b82db87cef85cd267c60 /test/text.tm | |
| parent | 319d4306b585569d198a6e0ac268c009eb63705a (diff) | |
Add Text.starts_with() and Text.ends_with()
Diffstat (limited to 'test/text.tm')
| -rw-r--r-- | test/text.tm | 10 |
1 files changed, 10 insertions, 0 deletions
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"]) |
