feat: replace IO class with System class and remove separate IO module
- Delete wren_io.c, wren_io.h, and io.wren source files - Remove multi-arity print overloads and IO.read/IO.time methods - Add System class with print, printAll, write, writeAll methods to core.wren - Update all documentation examples and README to use System.print instead of IO.print
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
IO.print("abcd".startsWith("cd")) // expect: false
|
||||
IO.print("abcd".startsWith("a")) // expect: true
|
||||
IO.print("abcd".startsWith("abcd")) // expect: true
|
||||
IO.print("abcd".startsWith("abcde")) // expect: false
|
||||
IO.print("abcd".startsWith("")) // expect: true
|
||||
System.print("abcd".startsWith("cd")) // expect: false
|
||||
System.print("abcd".startsWith("a")) // expect: true
|
||||
System.print("abcd".startsWith("abcd")) // expect: true
|
||||
System.print("abcd".startsWith("abcde")) // expect: false
|
||||
System.print("abcd".startsWith("")) // expect: true
|
||||
|
||||
// Non-ASCII.
|
||||
IO.print("søméthîng".startsWith("sømé")) // expect: true
|
||||
IO.print("søméthîng".startsWith("some")) // expect: false
|
||||
System.print("søméthîng".startsWith("sømé")) // expect: true
|
||||
System.print("søméthîng".startsWith("some")) // expect: false
|
||||
|
||||
// 8-bit clean.
|
||||
IO.print("a\0b\0c".startsWith("a")) // expect: true
|
||||
IO.print("a\0b\0c".startsWith("a\0")) // expect: true
|
||||
IO.print("a\0b\0c".startsWith("b\0")) // expect: false
|
||||
System.print("a\0b\0c".startsWith("a")) // expect: true
|
||||
System.print("a\0b\0c".startsWith("a\0")) // expect: true
|
||||
System.print("a\0b\0c".startsWith("b\0")) // expect: false
|
||||
|
||||
Reference in New Issue
Block a user