Skip to content

Commit 3385185

Browse files
committed
FEAT: Rename SPLIT's /INTO refinement
fixes: metaeducation/rebol-issues#2051
1 parent 2abd4c2 commit 3385185

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/mezz/mezz-series.r

+7-7
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ split: func [
422422
"Split a series into pieces; fixed or variable size, fixed number, or at delimiters"
423423
series [series!] "The series to split"
424424
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."
426426
/local size piece-size count mk1 mk2 res fill-val add-fill-val
427427
][
428428
either all [block? dlm parse dlm [some integer!]] [
@@ -439,7 +439,7 @@ split: func [
439439
size: dlm ; alias for readability
440440
res: collect [
441441
parse/all series case [
442-
all [integer? size into] [
442+
all [integer? size pieces] [
443443
if size < 1 [cause-error 'Script 'invalid-arg size]
444444
count: size - 1
445445
piece-size: to integer! round/down divide length? series size
@@ -458,14 +458,14 @@ split: func [
458458
]
459459
]
460460
]
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).
465465
fill-val: does [copy either any-block? series [[]] [""]]
466466
add-fill-val: does [append/only res fill-val]
467467
case [
468-
all [integer? size into] [
468+
all [integer? size pieces] [
469469
; If the result is too short, i.e., less items than 'size, add
470470
; empty items to fill it to 'size.
471471
; We loop here, because insert/dup doesn't copy the value inserted.

0 commit comments

Comments
 (0)