diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-05-20 15:19:31 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-05-20 15:19:31 -0400 |
| commit | 5b1960859fcc6331a486ced98c5f25d93168fa18 (patch) | |
| tree | a4969d21479d68f86a65f2cbb396878336db7bf2 /test/text.tm | |
| parent | 7dddfb71a0ebf8dbbe8a9bdfc156d7471ff943bd (diff) | |
Hook up Text.has(), Text.trimmed(), Text.without()
Diffstat (limited to 'test/text.tm')
| -rw-r--r-- | test/text.tm | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/text.tm b/test/text.tm index 9c451b89..9df48467 100644 --- a/test/text.tm +++ b/test/text.tm @@ -55,3 +55,40 @@ func main(): >> "Hello":replace("e", "X") = "HXllo" + + >> "Hello":has("l") + = yes + >> "Hello":has("l", End) + = no + >> "Hello":has("l", Start) + = no + + >> "Hello":has("o") + = yes + >> "Hello":has("o", where=End) + = yes + >> "Hello":has("o", where=Start) + = no + + >> "Hello":has("H") + = yes + >> "Hello":has("H", End) + = no + >> "Hello":has("H", Start) + = yes + + >> "Hello":without("l") + = "Heo" + >> "xxxx":without("x") + = "" + >> "xxxx":without("y") + = "xxxx" + >> "One two three four five six":without("e ") + = "Ontwo threfour fivsix" + + >> " one ":trimmed() + = "one" + >> " one ":trimmed(" aeiou") + = "n" + + >> amelie:has(amelie2) |
