// ets_tracing: off
import * as CK from "../../../../Collections/Immutable/Chunk";
import { pipe } from "../../../../Function";
import * as Map from "./map";
import * as MapChunks from "./mapChunks";
import * as SplitOnChunk from "./splitOnChunk";
/**
 * Splits strings on a delimiter.
 */

export function splitOn_(self, delimiter) {
  return Map.map_(SplitOnChunk.splitOnChunk_(MapChunks.mapChunks_(Map.map_(self, str => CK.from(str)), CK.flatten), CK.from(delimiter)), _ => [..._].join(""));
}
/**
 * Splits strings on a delimiter.
 *
 * @ets_data_first splitOn_
 */

export function splitOn(delimiter) {
  return self => splitOn_(self, delimiter);
}
//# sourceMappingURL=splitOn.js.map