g4tools
5.4.0
g4tools
tools
touplow
Go to the documentation of this file.
1
// Copyright (C) 2010, Guy Barrand. All rights reserved.
2
// See the file tools.license for terms.
3
4
#ifndef tools_touplow
5
#define tools_touplow
6
7
#include <string>
8
9
namespace
tools
{
10
11
inline
void
tolowercase
(std::string& a_string){
12
for
(std::string::iterator it=a_string.begin();it!=a_string.end();++it) {
13
char
c = *it;
14
*it = ((c) >=
'A'
&& (c) <=
'Z'
? c -
'A'
+
'a'
: c);
15
}
16
}
17
18
inline
void
touppercase
(std::string& a_string){
19
for
(std::string::iterator it=a_string.begin();it!=a_string.end();++it) {
20
char
c = *it;
21
*it = ((c) >=
'a'
&& (c) <=
'z'
? c -
'a'
+
'A'
: c);
22
}
23
}
24
25
}
26
27
#endif
tools::tolowercase
void tolowercase(std::string &a_string)
Definition:
touplow:11
tools::touppercase
void touppercase(std::string &a_string)
Definition:
touplow:18
tools
inlined C code : ///////////////////////////////////
Definition:
aida_ntuple:26
Generated by
1.8.20