DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
No More String Errors - String(C++)

Comparison Operations

The next group of functions are the comparisons.


==,etc.
int String::operator==(const String&) const;

The comparison operators (==, !=, <, <=, >=, and >) are all implemented for Strings. s == t is true if Strings s and t represent identical sequences of characters. As usual, != is the negation of ==. The other comparison operators implement lexicographic ordering using native character comparison. If String s is a proper initial substring of String t, then s < t is true.


Next topic: String functions
Previous topic: Element Selection and Substrings

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005