45#ifndef UTILS_CASECONVERSION_HPP
46#define UTILS_CASECONVERSION_HPP
54 template<
typename Container>
55 void toLower(Container& cont,
const std::locale& loc = std::locale()) {
56 std::transform(cont.begin(), cont.end(), cont.begin(),
57 [&loc](
char c) { return std::tolower(c, loc); });
60 template<
typename Container>
61 Container toLowerCopy(
const Container& cont,
62 const std::locale& = std::locale()) {
63 Container result {cont};
69 template<
typename Container>
70 void toUpper(Container& cont,
const std::locale& loc = std::locale()) {
71 std::transform(cont.begin(), cont.end(), cont.begin(),
72 [&loc](
char c) { return std::toupper(c, loc); });
75 template<
typename Container>
76 Container toUpperCopy(
const Container& cont,
77 const std::locale& = std::locale()) {
78 Container result {cont};
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.