test: String.get' and String.next'
This commit is contained in:
parent
afa567fc09
commit
7b8ade5ee4
2 changed files with 7 additions and 0 deletions
|
|
@ -58,3 +58,7 @@ def ssDots : Substring := "____abc.αβγ.123.____".toSubstring.extract ⟨4⟩
|
|||
#eval ssDots.splitOn "."
|
||||
def ssHyphs : Substring := "____abc--αβγ--123--____".toSubstring.extract ⟨4⟩ ⟨22⟩
|
||||
#eval ssHyphs.splitOn "--"
|
||||
|
||||
#eval "αβγ".get' 0 (by decide)
|
||||
#eval "αβγ".get' ⟨2⟩ (by decide)
|
||||
#eval "αβγ".next' ⟨2⟩ (by decide)
|
||||
|
|
|
|||
|
|
@ -42,3 +42,6 @@ false
|
|||
"abcd".toSubstring
|
||||
["abc".toSubstring, "αβγ".toSubstring, "123".toSubstring, "".toSubstring]
|
||||
["abc".toSubstring, "αβγ".toSubstring, "123".toSubstring, "".toSubstring]
|
||||
'α'
|
||||
'β'
|
||||
{ byteIdx := 4 }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue