* Splits a chain into an array of chains by separating it, using the * specified separator string or chain to determine where to make each split. * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split * @param {string|Chain} [separator] * @pa
(separator = undefined, limit = undefined)
| 177 | * @return {Chain[]} |
| 178 | */ |
| 179 | split (separator = undefined, limit = undefined) { |
| 180 | separator = separator instanceof Chain ? separator.toString() : separator |
| 181 | return this.getString() |
| 182 | .split(separator, limit) |
| 183 | .map(stringPart => Chain.wrap(stringPart, this._encoding)) |
| 184 | } |
| 185 | |
| 186 | /** |
| 187 | * Returns the characters in a string beginning at the specified location |
no test coverage detected