FWCore
MessageLogger
src
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
#include "
FWCore/MessageLogger/interface/ELstring.h
"
16
#include <cctype>
17
#include <cstring>
18
19
namespace
edm
{
20
21
bool
eq_nocase
(
const
ELstring
& s1,
const
char
s2
[]) {
22
using
std::toupper;
23
24
if
(s1.length() != strlen(
s2
))
25
return
false
;
26
27
ELstring::const_iterator
p1
;
28
const
char
*
p2
;
29
30
for
(
p1
= s1.begin(),
p2
=
s2
; *
p2
!=
'\0'
; ++
p1
, ++
p2
) {
31
if
(toupper(*
p1
) != toupper(*
p2
)) {
32
return
false
;
33
}
34
}
35
return
true
;
36
37
}
// eq_nocase()
38
39
bool
eq
(
const
ELstring
& s1,
const
ELstring
s2
) {
return
s1 ==
s2
; }
// eq()
40
41
}
// end of namespace edm */
edm
HLT enums.
Definition:
AlignableModifier.h:19
indexGen.s2
s2
Definition:
indexGen.py:107
edm::ELstring
std::string ELstring
Definition:
ELstring.h:21
p2
double p2[4]
Definition:
TauolaWrapper.h:90
p1
double p1[4]
Definition:
TauolaWrapper.h:89
edm::eq
bool eq(const ELstring &s1, const ELstring s2)
Definition:
ELstring.cc:39
edm::eq_nocase
bool eq_nocase(const ELstring &s1, const char s2[])
Definition:
ELstring.cc:21
ELstring.h
Generated for CMSSW Reference Manual by
1.8.16