test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ELstring.cc
Go to the documentation of this file.
1 // ----------------------------------------------------------------------
2 //
3 // ELstring.cc Provides a string class with the semantics of std::string.
4 // Customizers may substitute for this class to provide either
5 // a string with a different allocator, or whatever else.
6 //
7 // The elements of string semantics which are relied upon are listed
8 // in doc/ELstring.semantics
9 //
10 // History:
11 // 15-Nov-2001 WEB Inserted missing #include <cctype>
12 //
13 // ----------------------------------------------------------------------
14 
15 
17 #include <cctype>
18 #include <cstring>
19 
20 namespace edm
21 {
22 
23 
24 bool eq_nocase( const ELstring & s1, const char s2[] ) {
25  using std::toupper;
26 
27  if (s1.length() != strlen(s2) ) return false;
28 
29  ELstring::const_iterator p1;
30  const char * p2;
31 
32  for ( p1 = s1.begin(), p2 = s2; *p2 != '\0'; ++p1, ++p2 ) {
33  if ( toupper(*p1) != toupper(*p2) ) {
34  return false;
35  }
36  }
37  return true;
38 
39 } // eq_nocase()
40 
41 
42 bool eq( const ELstring & s1, const ELstring s2 ) {
43 
44  return s1 == s2;
45 
46 } // eq()
47 
48 
49 } // end of namespace edm */
tuple s2
Definition: indexGen.py:106
bool eq(const ELstring &s1, const ELstring s2)
Definition: ELstring.cc:42
double p2[4]
Definition: TauolaWrapper.h:90
bool eq_nocase(const ELstring &s1, const char s2[])
Definition: ELstring.cc:24
double p1[4]
Definition: TauolaWrapper.h:89
std::string ELstring
Definition: ELstring.h:26