This PR renames `Substring` to `Substring.Raw`. This is to signify its status as a second-class citizen (not deprecated, but no real plans for verification, like `String.Pos.Raw`) and to free up the name `Substring` for a possible future type `String.Substring : String -> Type` so that `s.Substring` is the type of substrings of `s`. The functions `String.toSubstring` and `String.toSubstring'` will remain for now for bootstrapping reasons.
47 lines
591 B
Text
47 lines
591 B
Text
"hellohello"
|
||
"hello hello"
|
||
5
|
||
['h', 'e', 'l', 'l', 'o']
|
||
['α', 'β']
|
||
[]
|
||
['α', 'β', 'γ']
|
||
"αβγ"
|
||
"αβγ"
|
||
"αβγ"
|
||
{ byteIdx := 2 }
|
||
['α', 'β']
|
||
"αβa"
|
||
"α α-"
|
||
'A'
|
||
"aβγ"
|
||
"abγ"
|
||
"abc"
|
||
"cbγ"
|
||
"0bc"
|
||
"01c"
|
||
"012"
|
||
"21c"
|
||
"λbc"
|
||
"abc-bc"
|
||
"abc"
|
||
"a\x00bb"
|
||
4
|
||
false
|
||
true
|
||
false
|
||
false
|
||
true
|
||
true
|
||
false
|
||
true
|
||
false
|
||
"βγ"
|
||
"γ"
|
||
"αβγδ".toRawSubstring
|
||
"abcd".toRawSubstring
|
||
"abcd".toRawSubstring
|
||
["abc".toRawSubstring, "αβγ".toRawSubstring, "123".toRawSubstring, "".toRawSubstring]
|
||
["abc".toRawSubstring, "αβγ".toRawSubstring, "123".toRawSubstring, "".toRawSubstring]
|
||
'α'
|
||
'β'
|
||
{ byteIdx := 4 }
|