CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/FWCore/MessageLogger/src/ELstring.cc

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------
00002 //
00003 // ELstring.cc  Provides a string class with the semantics of std::string.
00004 //              Customizers may substitute for this class to provide either
00005 //              a string with a different allocator, or whatever else.
00006 //
00007 // The elements of string semantics which are relied upon are listed
00008 // in doc/ELstring.semantics
00009 //
00010 // History:
00011 //   15-Nov-2001  WEB  Inserted missing #include <cctype>
00012 //
00013 // ----------------------------------------------------------------------
00014 
00015 
00016 #include "FWCore/MessageLogger/interface/ELstring.h"
00017 #include <cctype>
00018 #include <cstring>
00019 
00020 namespace edm
00021 {
00022 
00023 
00024 bool  eq_nocase( const ELstring & s1, const char s2[] )  {
00025   using std::toupper;
00026 
00027   if (s1.length() != strlen(s2) ) return false;
00028 
00029   ELstring::const_iterator  p1;
00030   const char             *  p2;
00031 
00032   for ( p1 = s1.begin(), p2 = s2;  *p2 != '\0';  ++p1, ++p2 )  {
00033     if ( toupper(*p1) != toupper(*p2) )  {
00034       return false;
00035     }
00036   }
00037   return true;
00038 
00039 }  // eq_nocase()
00040 
00041 
00042 bool  eq( const ELstring & s1, const ELstring s2 )  {
00043 
00044   return  s1 == s2;
00045 
00046 }  // eq()
00047 
00048 
00049 } // end of namespace edm  */