StringSplitter class

A utility class with methods for splitting strings.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

chunk(String string, int chunkSize) List<String>
Splits string into chunks, chunkSize characters in length.
split(String string, {required List<String> splitters, List<Object>? delimiters, bool removeSplitters = true, bool trimParts = false}) List<String>
Splits string into parts, slicing the string at each occurrence of any of the splitters. string must not be null, splitters must not be null or empty.
stream(String string, {required List<String> splitters, List<Object>? delimiters, bool removeSplitters = true, bool trimParts = false, required int chunkSize}) Stream<List<String>>
For parsing long strings, stream splits string into chunks and streams the returned parts as each chunk is split.