(file) Return to String.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/String.cpp between version 1.39 and 1.41

version 1.39, 2002/05/06 20:13:08 version 1.41, 2002/06/01 00:56:38
Line 1 
Line 1 
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM  // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,
   // The Open Group, Tivoli Systems
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 520 
Line 521 
     return 0;     return 0;
 } }
  
   int String::compareNoCase(const String& s1, const String& s2)
   {
       const Char16* _s1 = s1.getData();
       const Char16* _s2 = s2.getData();
   
       while (*_s1 && *_s2)
       {
           int r;
   
   #ifdef PEGASUS_HAS_EBCDIC
           if (*_s1 <= 255 && *_s2 <= 255)
   #else
           if (*_s1 <= 127 && *_s2 <= 127)
   #endif
           {
               r = tolower(*_s1++) - tolower(*_s2++);
           }
           else
           {
               r = *_s1++ - *_s2++;
           }
   
           if (r)
               return r;
       }
   
       if (*_s2)
           return -1;
       else if (*_s1)
           return 1;
   
       return 0;
   }
   
 Boolean String::equal(const String& str1, const String& str2) Boolean String::equal(const String& str1, const String& str2)
 { {
     if (str1.size() != str2.size())     if (str1.size() != str2.size())


Legend:
Removed from v.1.39  
changed lines
  Added in v.1.41

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2