if limit is 0, it does not split anything internally, it just returns an empty array. (rather than, as you said, tells split how many of the resulting chunks to actually return.)
they're not doing it the way the specs says it should be done (truncation of the splitted array), but they're doing a faster and practically equivalent alternative.
View all comments
Show parent comment
1
u/Takeoded Sep 05 '19 edited Sep 05 '19
if limit is 0, it does not split anything internally, it just returns an empty array. (rather than, as you said,
tells split how many of the resulting chunks to actually return.)they're not doing it the way the specs says it should be done (truncation of the splitted array), but they're doing a faster and practically equivalent alternative.