isLtrChar static method

bool isLtrChar(
  1. int codeUnit
)

Check if a code unit is an LTR character (strong)

Implementation

static bool isLtrChar(int codeUnit) {
  // Latin, Greek, Cyrillic, and other LTR scripts
  return (codeUnit >= 0x0041 && codeUnit <= 0x005A) || // A-Z
      (codeUnit >= 0x0061 && codeUnit <= 0x007A) || // a-z
      (codeUnit >= 0x00C0 && codeUnit <= 0x00FF) || // Latin Extended
      (codeUnit >= 0x0100 && codeUnit <= 0x017F) || // Latin Extended-A
      (codeUnit >= 0x0180 && codeUnit <= 0x024F) || // Latin Extended-B
      (codeUnit >= 0x0370 && codeUnit <= 0x03FF) || // Greek
      (codeUnit >= 0x0400 && codeUnit <= 0x04FF) || // Cyrillic
      codeUnit == lrm ||
      codeUnit == lre ||
      codeUnit == lro ||
      codeUnit == lri;
}