lineReader function

void lineReader(
  1. String line
)

Implementation

void lineReader(String line) {
  String l, RD, TH;
  var lastID = <String>[
    '0',
    '1',
    '2',
    '3',
    '4',
    '5',
    '6',
    '7',
    '8',
    '9',
    'A',
    'B',
    'C',
    'D',
    'E',
    'F'
  ];
  var firstByte = line.substring(3, 5);
  //print(firstByte);
  print(line);
  l = line.substring(10, line.length - 4);
  print(l);
  var third = l.split('<br>');
  //print(third);
  third.forEach((String group) {
    print(group);
    var charList = group.split(' ');
    print(charList);
    RD = ascii09AF(charList[0]);
    for (var i = 1; i < charList.length; i++) {
      TH = lastID[i - 1];
      var hex = firstByte + RD + TH;
      //print('${charList[i]} : $hex');
      /*
      Map<String, int> mNewword = new Map<String, int>();
      mNewword[charList[i]] = int.parse(hex, radix: 16);
      gbkMap.addAll(mNewword);*/
      //gbkMap[charList[i]] = int.parse(hex, radix: 16); //unitCode
      gbkMap!.putIfAbsent(charList[i], () => int.parse(hex, radix: 16));
      print(
          '"${charList[i]}" $hex = ${hex.codeUnitAt(0)} ${hex.codeUnitAt(1)} ${hex.codeUnitAt(2)} ${hex.codeUnitAt(3)} ');
    }
  });
}