@@ -422,7 +422,7 @@ split: func [
422
422
"Split a series into pieces; fixed or variable size, fixed number, or at delimiters"
423
423
series [series! ] "The series to split"
424
424
dlm [block! integer! char! bitset! any-string! ] "Split size, delimiter(s), or rule(s)."
425
- /into "If dlm is an integer, split into n pieces, rather than pieces of length n."
425
+ /pieces "If dlm is an integer, split into n pieces, rather than pieces of length n."
426
426
/local size piece-size count mk1 mk2 res fill-val add-fill-val
427
427
] [
428
428
either all [block? dlm parse dlm [some integer! ]] [
@@ -439,7 +439,7 @@ split: func [
439
439
size: dlm ; alias for readability
440
440
res: collect [
441
441
parse/all series case [
442
- all [integer? size into ] [
442
+ all [integer? size pieces ] [
443
443
if size < 1 [cause-error 'Script 'invalid-arg size]
444
444
count: size - 1
445
445
piece-size: to integer! round/down divide length? series size
@@ -458,14 +458,14 @@ split: func [
458
458
]
459
459
]
460
460
]
461
- ;-- Special processing, to handle cases where the spec'd more items in
462
- ; /into than the series contains (so we want to append empty items),
463
- ; or where the dlm was a char/string/charset and it was the last char
464
- ; (so we want to append an empty field that the above rule misses).
461
+ ; Special processing, to handle cases where the spec'd more items in
462
+ ; /pieces than the series contains (so we want to append empty items),
463
+ ; or where the dlm was a char/string/charset and it was the last char
464
+ ; (so we want to append an empty field that the above rule misses).
465
465
fill-val : does [copy either any-block? series [[]] ["" ]]
466
466
add-fill-val : does [append /only res fill-val]
467
467
case [
468
- all [integer? size into ] [
468
+ all [integer? size pieces ] [
469
469
; If the result is too short, i.e., less items than 'size, add
470
470
; empty items to fill it to 'size.
471
471
; We loop here, because insert/dup doesn't copy the value inserted.
0 commit comments