| | | | | |

String Implementation: Comparison Operators

int operator == (const String& s1, const String& s2)
{
  return (String::StrCmp(s1, s2) == 0);
}

int operator != (const String& s1, const String& s2)
{
  return (String::StrCmp(s1, s2) != 0);
}

int operator >  (const String& s1, const String& s2)
{
  return (String::StrCmp(s1, s2) > 0);
}

int operator >=  (const String& s1, const String& s2)
{
  return (String::StrCmp(s1, s2) >= 0);
}

int operator <  (const String& s1, const String& s2)
{
  return (String::StrCmp(s1, s2) < 0);
}

int operator <=  (const String& s1, const String& s2)
{
  return (String::StrCmp(s1, s2) <= 0);
}

| | Top of Page | 3. C Strings, Proper Type, and String Objects - 11 of 17