normalizeCampusMapQuery function
- String value
Normalizes classroom queries, including full-width ASCII and separators.
Implementation
String normalizeCampusMapQuery(String value) => String.fromCharCodes(
value.runes.map(
(rune) => switch (rune) {
>= 0xff01 && <= 0xff5e => rune - 0xfee0,
0x3000 => 0x20,
_ => rune,
},
),
).toLowerCase().replaceAll(RegExp(r'[\s_\-()()/]+'), '');