//: C03:ICompare.cpp // From "Thinking in C++, Volume 2", by Bruce Eckel & Chuck Allison. // (c) 1995-2004 MindView, Inc. All Rights Reserved. // See source code use permissions stated in the file 'License.txt', // distributed with the code package available at www.MindView.net. #include #include #include "ichar_traits.h" using namespace std; int main() { // The same letters except for case: istring first = "tHis"; istring second = "ThIS"; cout << first << endl; cout << second << endl; assert(first.compare(second) == 0); assert(first.find('h') == 1); assert(first.find('I') == 2); assert(first.find('x') == string::npos); } ///:~