Compare characters

Web Site  Methods

 
Char::operator ==
Char::operator !=
 

BOOL operator ==(const Char& c1, const Char& c2)
BOOL operator == (const Char& c1, const STRCHAR c2)
BOOL operator ==(const STRCHAR c1, const Char& c2)
BOOL operator !=(const Char& c1, const Char& c2)
BOOL operator != (const Char& c1, const STRCHAR c2)
BOOL operator !=(const STRCHAR c1, const Char& c2);

The == and != operators are overloaded to compare the two characters and return TRUE if they are equal (or not equal). The comparision is case-sensitive.

Note that there are no operators for "greater than" or "less than" - you have to use Compare for that.

 

Important: When using Borland C++ Builder, the Char class is named StrChar to avoid a collision with a standard Borland VCL datatype

 

See also: Char class, String: Find, Replace, Compare