From 467d9d3692bb4a2e2d478a4e260dc7a4ca3ca143 Mon Sep 17 00:00:00 2001 From: dickelbeck Date: Sat, 22 Dec 2007 07:17:22 +0000 Subject: [PATCH] added strlower() --- common/string.cpp | 16 ++++++++++++++++ include/common.h | 1 + 2 files changed, 17 insertions(+) diff --git a/common/string.cpp b/common/string.cpp index d12ea81cb3..6e113e82c8 100644 --- a/common/string.cpp +++ b/common/string.cpp @@ -372,3 +372,19 @@ char* strupper( char* Text ) return Text; } + +/********************************/ +char* strlower( char* text ) +/********************************/ +{ + char* start = text; + + while( *text ) + { + if( *text >= 'A' && *text <= 'Z' ) + *text -= 'A' - 'a'; + text++; + } + + return start; +} diff --git a/include/common.h b/include/common.h index ca514d5117..4fbdb7aebc 100644 --- a/include/common.h +++ b/include/common.h @@ -491,6 +491,7 @@ wxString FindKicadFile( const wxString& shortname ); /* STRING.CPP */ /*************/ char* strupper( char* Text ); +char* strlower( char* Text ); int ReadDelimitedText( char* dest, char* source, int NbMaxChar );