swu2key function

String swu2key(
  1. String swuSym
)

Implementation

String swu2key(String swuSym) {
  int symcode = swuSym.runes.first - 0x40001;
  int base = symcode ~/ 96;
  int fill = (symcode - (base * 96)) ~/ 16;
  int rotation = symcode - (base * 96) - (fill * 16);
  return 'S${(base + 0x100).toRadixString(16)}${fill.toRadixString(16)}${rotation.toRadixString(16)}';
}