split
split: (
buffer,separator?,options?) =>object
Defined in: utils/buffers/split.js:35
Splits a Buffer by a separator pattern.
Parameters
Section titled “Parameters”buffer?
Section titled “buffer?”any = ...
Source buffer to split
separator?
Section titled “separator?”any
Byte pattern to split on
options?
Section titled “options?”KMP split options
limit?
Section titled “limit?”number = Infinity
Maximum splits to produce
lookup?
Section titled “lookup?”number[]
Pre-computed KMP failure function table
partial?
Section titled “partial?”number
Partial KMP match state from prior chunk
Returns
Section titled “Returns”object
- Split result with buffer slices, partial state, and lookup table
buffers
Section titled “buffers”buffers:
any[]
lookup
Section titled “lookup”lookup:
number[]
partial
Section titled “partial”partial:
number