00001 #include "wxStringIRC.h"
00002
00003
00004 wxString wxStringIRC::Lower() const
00005 {
00006 wxChar carattere;
00007 wxString stringa;
00008 for(unsigned int i=0; i<Len(); i++)
00009 {
00010 carattere = GetChar(i);
00011 if (64<carattere && carattere<94)
00012 carattere = carattere + 32;
00013 else if ( carattere == 126 )
00014 carattere = carattere - 32;
00015 stringa.Append( carattere );
00016 }
00017 return stringa;
00018 }
00019
00020 int wxStringIRC::CmpNoCase(const wxChar* psz)
00021 {
00022 wxStringIRC stringa;
00023 wxStringIRC stringa2;
00024 wxString appoggio;
00025 stringa2.Append(psz);
00026 appoggio=stringa2.Lower();
00027 stringa2.Clear();
00028 stringa2.Append(appoggio);
00029 appoggio.Clear();
00030 appoggio=this->Lower();
00031 stringa.Append(appoggio);
00032 return stringa.Cmp(stringa2);
00033 }
00034