Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/touplow is written in an unsupported language. File is not indexed.

0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003 
0004 #ifndef tools_touplow
0005 #define tools_touplow
0006 
0007 #include <string>
0008 
0009 namespace tools {
0010 
0011 inline void tolowercase(std::string& a_string){
0012   for(std::string::iterator it=a_string.begin();it!=a_string.end();++it) {
0013     char c = *it;
0014     *it = ((c) >= 'A' && (c) <= 'Z' ?  c - 'A' + 'a' : c);
0015   }
0016 }
0017 
0018 inline void touppercase(std::string& a_string){
0019   for(std::string::iterator it=a_string.begin();it!=a_string.end();++it) {
0020     char c = *it;
0021     *it = ((c) >= 'a' && (c) <= 'z' ?  c - 'a' + 'A' : c);
0022   }
0023 }
0024 
0025 }
0026 
0027 #endif