normalize static method

List<String> normalize(
  1. String text
)

Implementation

static List<String> normalize(String text) => text
    .toUpperCase()
    .split(RegExp(r'\r?\n'))
    .map(
      (line) => line
          .replaceAll(RegExp(r'\s'), '')
          .replaceAll(RegExp('[«‹〈<]'), '<'),
    )
    .where((line) => line.isNotEmpty)
    .toList();