static int getNumberOfNewlines(String s) { // return s.allMatches('\n').length; return const LineSplitter().convert(s).length; }