splitByCharacter method

List<String> splitByCharacter()

Splits the text by character.

It is used for searching.

Implementation

List<String> splitByCharacter() {
  if (isEmpty) {
    return <String>[];
  }
  if (length <= 1) {
    return [this];
  }
  final tmp = <String>[];
  for (int i = 0; i < length - 1; i++) {
    tmp.add(substring(i, min(i + 1, length)));
  }
  return tmp;
}