Refactor splits/2 using foreach syntax (remove private filter _nwise) (#3260)
This commit refactors `splits/2` implementation using `foreach` syntax and reduces intermediate arrays. This refactoring removes an unnecessary private (and undocumented) filter `_nwise` and closes #3148.
This commit is contained in:
1 parent
96d19ca2ee
commit
b088e83a82
5 files changed
+37
-21
No files matched your search
Generated
+4
@@ -3032,6 +3032,10 @@ These provide the same results as their \fBsplit\fR counterparts, but as a strea
|
||||
jq \'splits(", *")\'
|
||||
"ab,cd, ef, gh"
|
||||
=> "ab", "cd", "ef", "gh"
|
||||
|
||||
jq \'splits(",? *"; "n")\'
|
||||
"ab,cd ef, gh"
|
||||
=> "ab", "cd", "ef", "gh"
|
||||
.
|
||||
.fi
|
||||
.
|
||||
|
||||
Reference in new issue
Block a user