containsRtl static method

bool containsRtl(
  1. String text
)

Implementation

static bool containsRtl(String text) {
  for (int i = 0; i < text.length; i++) {
    final int codeUnit = text.codeUnitAt(i);
    final BidiCategory category = _getBidiCategory(codeUnit);

    if (category == BidiCategory.R || category == BidiCategory.AL) {
      return true;
    }
  }

  return false;
}