/* * QT AGI Studio :: Copyright (C) 2000 Helen Zommer * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include "util.h" #include #include #include #include TStringList::TStringList () { num=0; max=0; inc=16; data=NULL; } void TStringList::toLower(void) { for(int i=0;i=max){ max+=inc; string *data1 = new string[max]; for(int i=0;i=max){ max+=inc; string *data1 = new string[max]; for(int i=0;i s){ for(int k=num;k>i;k--){ data[k]=data[k-1]; } data[i]=s; num++; return; } } data[num++]=s; } void TStringList::copy(const TStringList& list) { num=list.num; max=list.max; delete [] data; data = new string[max]; for(int i=0;i0){ delete [] data; data=NULL; num=0; max=0; } } //************************************** string MultStr(const char *str,int NumCopies) { char tmp[256]; tmp[0]=0; for(int i=0;ilength();i++){ str->at(i)=tolower(str->at(i)); } } void toLower(char *str) { for(int i=0;i<(int)strlen(str);i++){ str[i]=tolower(str[i]); } } //*********************************