#ifndef Morpheo_ChangeCase_h #define Morpheo_ChangeCase_h /* * $Id: ChangeCase.h 88 2008-12-10 18:31:39Z rosiere $ * * [ Description ] * */ #include #include namespace morpheo { inline void UpperCase(std::string& S) { uint32_t n = S.size(); for (uint32_t j = 0; j < n; j++) { char sj = S[j]; if (sj >= 'a' && sj <= 'z') S[j] = static_cast(sj - ('a' - 'A')); } } inline void LowerCase(std::string& S) { uint32_t n = S.size(); for (uint32_t j = 0; j < n; j++) { char sj = S[j]; if (sj >= 'A' && sj <= 'Z') S[j] = static_cast(sj + ('a' - 'A')); } } }; // end namespace morpheo #endif