From 2fe21974f404134c8128e032838bbd761590256e Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 15 Sep 2002 09:40:51 +0000 Subject: toLower --- src/StringUtil.cc | 7 ++++++- src/StringUtil.hh | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/StringUtil.cc b/src/StringUtil.cc index 1a9e7f1..d37446a 100644 --- a/src/StringUtil.cc +++ b/src/StringUtil.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: StringUtil.cc,v 1.11 2002/08/14 22:43:30 fluxgen Exp $ +// $Id: StringUtil.cc,v 1.12 2002/09/15 09:40:51 fluxgen Exp $ #include "StringUtil.hh" @@ -133,4 +133,9 @@ int getStringBetween(std::string& out, const char *instr, const char first, cons return (j+1+total_add); } +void toLower(char * const conv) { + for (int byte_pos = 0; byte_pos < strlen(conv); ++byte_pos) + conv[byte_pos] = tolower(conv[byte_pos]); +} + }; //end namespace StringUtil diff --git a/src/StringUtil.hh b/src/StringUtil.hh index f2f4944..a77dbf0 100644 --- a/src/StringUtil.hh +++ b/src/StringUtil.hh @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -//$Id: StringUtil.hh,v 1.9 2002/08/14 22:43:30 fluxgen Exp $ +//$Id: StringUtil.hh,v 1.10 2002/09/15 09:40:26 fluxgen Exp $ #ifndef STRINGUTIL_HH #define STRINGUTIL_HH @@ -38,6 +38,8 @@ std::string expandFilename(const std::string &filename); int getStringBetween(std::string& out, const char *instr, const char first, const char last, const char *ok_chars=" \t\n"); +void toLower(char * const conv); + //--------- stringtok ---------------------------------- // Breaks a string into tokens //-------------------------------------------------- -- cgit v0.11.2