bool codeUnitsEqual()

in lib/src/style/windows.dart [144:158]


  bool codeUnitsEqual(int codeUnit1, int codeUnit2) {
    if (codeUnit1 == codeUnit2) return true;

    /// Forward slashes and backslashes are equivalent on Windows.
    if (codeUnit1 == chars.slash) return codeUnit2 == chars.backslash;
    if (codeUnit1 == chars.backslash) return codeUnit2 == chars.slash;

    // If this check fails, the code units are definitely different. If it
    // succeeds *and* either codeUnit is an ASCII letter, they're equivalent.
    if (codeUnit1 ^ codeUnit2 != _asciiCaseBit) return false;

    // Now we just need to verify that one of the code units is an ASCII letter.
    final upperCase1 = codeUnit1 | _asciiCaseBit;
    return upperCase1 >= chars.lowerA && upperCase1 <= chars.lowerZ;
  }