equals static method

bool equals(
  1. String? a,
  2. String? b
)

Implementation

static bool equals(String? a, String? b) {
  if (a == b) return true;
  if (a != null && b != null && (a.length == b.length)) {
    for (int i = 0; i < a.length; i++) {
      if (a.codeUnitAt(i) != b.codeUnitAt(i)) return false;
    }
    return true;
  }
  return false;
}