Skip to content

Instantly share code, notes, and snippets.

@tbrowder
Last active July 12, 2025 23:07
Show Gist options
  • Save tbrowder/198b7c70d861b35ad37e56012fa122ab to your computer and use it in GitHub Desktop.
Save tbrowder/198b7c70d861b35ad37e56012fa122ab to your computer and use it in GitHub Desktop.
raku-core-split-test
==================================
# raku code: split ':', "foo bar baz"; # no limit specified
core split with NO delimiter match
delimiter: ':'
input : 'foo bar baz'
output :
# Subtest
'foo bar baz'
1..0
ok 20 -
ok 21 - strange default: 1 part (max) for core split
ok 22 - 1st part: 'foo bar baz'
==================================
==================================================
# raku code: split ':', ": bar"; # no limit specified
core split with NO text BEFORE the delimiter
delimiter: ':'
input : ': bar'
output :
# Subtest
''
' bar'
1..0
ok 23 -
ok 24 - strange default: 2 parts (max) for core split
ok 25 - 1st part: ''
ok 26 - 2nd part: ' bar'
==================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment