* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
*
- * $Id: tool.c,v 1.7 2002/03/12 14:37:52 alex Exp $
+ * $Id: tool.c,v 1.9 2002/05/27 13:09:27 alex Exp $
*
* tool.c: Hilfsfunktionen, ggf. Platformabhaengig
*/
#include "imp.h"
#include <assert.h>
+#include <ctype.h>
#include <stdio.h>
#include <string.h>
#include "tool.h"
-GLOBAL VOID ngt_TrimStr( CHAR *String )
+GLOBAL VOID
+ngt_TrimStr( CHAR *String )
{
/* Mit ngt_TrimStr() werden fuehrende und folgende Leerzeichen,
* Tabulatoren und Zeilenumbrueche (ASCII 10 und ASCII 13) aus
} /* ngt_TrimStr */
+GLOBAL CHAR *
+ngt_LowerStr( CHAR *String )
+{
+ /* String in Kleinbuchstaben konvertieren. Der uebergebene
+ * Speicherbereich wird durch das Ergebnis ersetzt, zusaetzlich
+ * wird dieser auch als Pointer geliefert. */
+
+ CHAR *ptr;
+
+ assert( String != NULL );
+
+ /* Zeichen konvertieren */
+ ptr = String;
+ while( *ptr )
+ {
+ *ptr = tolower( *ptr );
+ ptr++;
+ }
+
+ return String;
+} /* ngt_LowerStr */
+
+
/* -eof- */