Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/Fred/String/StrComp.cpp

Go to the documentation of this file.
00001 #ifndef __J2K__JString_Compare_CPP__
00002 #define __J2K__JString_Compare_CPP__
00003 
00004 #include <j2k/Fred/String/String.hpp>
00005 
00006 // The only compare function that is not inlined.
00007 
00008 int JString::compare( char r ) const 
00009 {
00010   if ( pData == strNull  &&  r == 0 ) return 0;
00011   register char c = pData->data[0];
00012   if ( c > r ) return 1;
00013   if ( c < r ) return (-1);
00014   if ( c == r  && pData->length == 1 ) return 0;
00015   return (-1);
00016 } 
00017 
00018 #endif

Generated on Sun Oct 14 18:46:29 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001