roc/test/snapshots/repl/str_split_on.md
Luke Boswell f95228dca1
add Str.split_on builtin with comprehensive tests
Includes interpreter tests in low_level_interp_test.zig for all new builtins:
- count_utf8_bytes: tests empty, ASCII, multi-byte UTF-8, emoji
- with_capacity: tests zero and non-zero capacity
- reserve: tests content preservation
- release_excess_capacity: tests content preservation
- to_utf8: tests length verification via List.len
- from_utf8_lossy: tests roundtrip with to_utf8
- split_on: tests count and actual substring content via List.first

Also updates Color.md snapshot now that to_utf8 is a valid method.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 12:52:37 +11:00

318 B

META

description=Str.split_on should split a string on a delimiter
type=repl

SOURCE

» List.len(Str.split_on("hello world", " "))
» List.len(Str.split_on("a,b,c", ","))
» List.len(Str.split_on("no match", "x"))
» List.len(Str.split_on("", ","))

OUTPUT

2

3

1

1

PROBLEMS

NIL