equals static method

bool equals(
  1. String value,
  2. String other
)

Implementation

static bool equals(String value, String other) {
  int n = other.length;
  if (n == value.length) {
    int i = 0;
    while (n-- != 0) {
      if (value.codeUnitAt(i) != other.codeUnitAt(i)) return false;
      i++;
    }
    return true;
  }
  return false;
}