diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-02 23:56:08 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-02 23:56:08 -0400 |
| commit | 6c22999eded909b77b1d7718cf3f1dc969b55779 (patch) | |
| tree | 2dd833569ae33890bf61d891b84e4c2eaf9db16f /test | |
| parent | 5aa5a5e99b322586eed9997a14b3d616540bef07 (diff) | |
Add text slicing
Diffstat (limited to 'test')
| -rw-r--r-- | test/text.tm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/text.tm b/test/text.tm index 39e8a6e1..afd0305a 100644 --- a/test/text.tm +++ b/test/text.tm @@ -191,3 +191,15 @@ func main(): = 4 >> len = 3_i64 + + //! Test text slicing: + >> "abcdef":slice() + = "abcdef" + >> "abcdef":slice(from=3) + = "cdef" + >> "abcdef":slice(to=-2) + = "abcde" + >> "abcdef":slice(from=2, to=4) + = "bcd" + >> "abcdef":slice(from=5, to=1) + = "" |
