Clean up text handling a bit:
- Rename IO.write -> IO.print. - Make IO.write not print a newline. - Support \u Unicode escapes in strings.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
var inclusive = 2..5
|
||||
IO.write(inclusive is Range) // expect: true
|
||||
IO.write(inclusive.min) // expect: 2
|
||||
IO.write(inclusive.max) // expect: 5
|
||||
IO.print(inclusive is Range) // expect: true
|
||||
IO.print(inclusive.min) // expect: 2
|
||||
IO.print(inclusive.max) // expect: 5
|
||||
|
||||
var exclusive = 2...5
|
||||
IO.write(exclusive is Range) // expect: true
|
||||
IO.write(exclusive.min) // expect: 2
|
||||
IO.write(exclusive.max) // expect: 4
|
||||
IO.print(exclusive is Range) // expect: true
|
||||
IO.print(exclusive.min) // expect: 2
|
||||
IO.print(exclusive.max) // expect: 4
|
||||
|
||||
// TODO: Non-number RHS.
|
||||
// TODO: Non-integer RHS.
|
||||
|
||||
Reference in New Issue
Block a user