diff options
author | Stijn Buys <ingar@osirion.org> | 2008-05-24 16:40:06 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-05-24 16:40:06 +0000 |
commit | 274fcfe8d3fc5b54b345d79fab6dd4bbdb544892 (patch) | |
tree | 6c452ce4c5d411334024e49d67182c6402e1a0d7 /src/auxiliary/functions.cc | |
parent | 191a300e67edba6ae6a12a37ceb03b4f12f3ba08 (diff) |
aux::lowercase, aux::to_lowercase
Diffstat (limited to 'src/auxiliary/functions.cc')
-rw-r--r-- | src/auxiliary/functions.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/auxiliary/functions.cc b/src/auxiliary/functions.cc index 2b42bae..b417a4a 100644 --- a/src/auxiliary/functions.cc +++ b/src/auxiliary/functions.cc @@ -76,4 +76,18 @@ const std::string spaces(const std::string &text,size_t n) return s; } +void to_lowercase(std::string &text) +{ + for (std::string::iterator i = text.begin(); i != text.end(); ++i) + (*i) = tolower(*i); +} + +const std::string lowercase(const std::string &text) +{ + std::string t; + for (std::string::const_iterator i = text.begin(); i != text.end(); ++i) + t += tolower(*i); + return t; +} + } |