internal bool Equals(Strip other) { ResetCurrentIndex(); other.ResetCurrentIndex(); char thisChar; do { thisChar = GetNextChar(); if (!AreCharsEqual(thisChar, other.GetNextChar())) { return(false); } } while (thisChar != END_OF_STRING); return(true); }
private bool StartsWith(Strip other) { ResetCurrentIndex(); other.ResetCurrentIndex(); while (true) { char otherChar = other.GetNextChar(); if (otherChar == END_OF_STRING) { break; } char thisChar = GetNextChar(); if (!AreCharsEqual(thisChar, otherChar)) { return(false); } } return(true); }