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

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

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004