mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 22:28:45 +01:00
- Rename IO.write -> IO.print. - Make IO.write not print a newline. - Support \u Unicode escapes in strings.
12 lines
348 B
Plaintext
12 lines
348 B
Plaintext
// Returns characters (as strings).
|
|
IO.print("abcd"[0]) // expect: a
|
|
IO.print("abcd"[1]) // expect: b
|
|
IO.print("abcd"[2]) // expect: c
|
|
IO.print("abcd"[3]) // expect: d
|
|
|
|
// Allows indexing backwards from the end.
|
|
IO.print("abcd"[-4]) // expect: a
|
|
IO.print("abcd"[-3]) // expect: b
|
|
IO.print("abcd"[-2]) // expect: c
|
|
IO.print("abcd"[-1]) // expect: d
|