Retoor software development Projects Research SearchXNG
Register Sign In

9 lines
245 B
Plaintext
Raw Normal View History

feat: rename IO.write to IO.print and add Unicode escape support in strings Rename the IO.write method to IO.print, which now prints without a trailing newline, and add a new IO.print method that appends a newline after output. Update all benchmark, example, and test files to use IO.print instead of IO.write. Additionally, implement Unicode escape sequence parsing in the compiler's string tokenizer, supporting \uXXXX and \u{...} syntax with proper UTF-8 encoding for code points up to U+10FFFF.
2014-01-05 21:27:12 +01:00
IO.print("".count) // expect: 0
IO.print("a string".count) // expect: 8
feat: add 8-bit string test cases across concatenation, contains, count, ends_with, equality, index_of, iterate, iterator_value, join, starts_with, subscript, and to_string Add comprehensive test coverage for strings containing null bytes (\0) to ensure all string operations correctly handle 8-bit clean data. Tests verify that concatenation, substring search, length counting, boundary checks, equality comparisons, index lookups, iteration, joining, and conversion to string all treat embedded null bytes as regular characters rather than terminators.
2015-02-04 13:58:16 +01:00
// 8-bit clean
IO.print("\0".count) // expect: 1
IO.print("a\0b".count) // expect: 3
IO.print("\0c".count) // expect: 2
IO.print(("a\0b" + "\0c").count) // expect: 5
Reference in New Issue Copy Permalink
daf0728b12
wren/test/string/count.wren
Response time: 135ms
Mail Licenses API