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

C:/temp/src/j2k/Deprecated/old_18mar_diff/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   if ( pData == strNull  &&  r == 0 ) return 0;
00010   register char c = pData->data[0];
00011   if ( c > r ) return 1;
00012   if ( c < r ) return (-1);
00013   if ( c == r  && pData->length == 1 ) return 0;
00014   return (-1);
00015 } 
00016 
00017 #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