Last active
July 12, 2025 23:07
-
-
Save tbrowder/198b7c70d861b35ad37e56012fa122ab to your computer and use it in GitHub Desktop.
raku-core-split-test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
================================== | |
# 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