convert method
Implementation
List<String> convert(String data) {
List<String> lines = <String>[];
int end = data.length;
int sliceStart = 0;
int char = 0;
for (int i = 0; i < end; i++) {
int previousChar = char;
char = data.codeUnitAt(i);
if (char != _CR) {
if (char != _LF) continue;
if (previousChar == _CR) {
sliceStart = i + 1;
continue;
}
}
lines.add(data.substring(sliceStart, i));
sliceStart = i + 1;
}
if (sliceStart < end) {
lines.add(data.substring(sliceStart, end));
}
return lines;
}