forked from Mirror/wren
More stuff for working with strings and bytes!
- "\x" escape sequence to put byte values in strings: "\x34" - String.byteAt(index) gets value of byte in string. - String.bytes returns a raw sequence of bytes for a string. - String.codePointAt(index) gets the code point at an offset as a raw number.
This commit is contained in:
6
test/core/string/bytes.wren
Normal file
6
test/core/string/bytes.wren
Normal file
@ -0,0 +1,6 @@
|
||||
// Bytes: 11111
|
||||
// 012345678901234
|
||||
// Chars: sø mé ஃ thî ng
|
||||
var s = "søméஃthîng"
|
||||
|
||||
IO.print(s.bytes is StringByteSequence) // expect: true
|
||||
Reference in New Issue
Block a user