Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

stringc.h

Go to the documentation of this file.
00001 /*
00002 Copyright (C) 1999  Carsten Winkelholz
00003 
00004 Address:  FGAN Forschungsgesellschaft fr Angewandte Naturwissenschaften e. V.
00005       Neuenahrer Str. 20
00006       D - 53343 Wachtberg
00007       
00008 Email:    winkelholz@fgan.de
00009 
00010 This program is free software; you can redistribute it and/or
00011 modify it under the terms of the GNU General Public License
00012 as published by the Free Software Foundation; either version 2
00013 of the License, or (at your option) any later version.
00014 
00015 This program is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License
00021 along with this program; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023 */
00024 
00025 
00026 #ifndef STRINGC_H
00027 #define STRINGC_H
00028 
00029 
00030 #include "kettec.h"
00031 #include <stdio.h>
00032 #include <stdlib.h>
00033 
00034 #include "../oawconfig.h"
00035 
00036 OAW_BEGIN_NAMESPACE
00037 
00038 class StringC;
00039 
00040 //typedef StringC* pStringC;
00041 
00042 class OAW_DLLMAPPING StringC
00043 {
00044 public:
00045   StringC();
00046   StringC(long);
00047   StringC(const StringC& s);
00048   StringC(char ch);
00049   StringC(const char* s);
00050   StringC(const char* s,long);
00051   StringC(long,long);
00052   ~StringC();
00053   long size() const {return m_len;}
00054   void make_upr();
00055   void make_lwr();
00056   void format(const char *pFormat ...);
00057   long GetBlockLength() const {return m_blocklen;}
00058   long GetBufferLength() const {return m_buflen;}
00059   void SetBlockLength(long l){m_blocklen = l;}
00060   void SetBufferLength(long);
00061   void Empty(){m_len=0;m_str[0]='\0';}
00062   inline char& operator [](long i){return m_str[i];}
00063   StringC Right(long n) const;
00064   StringC Left(long n) const;
00065   StringC FromTo(long a,long e) const;
00066   StringC OnTheRightOfFirst(const StringC&) const;
00067   StringC OnTheRightOfFirst(StringC*,long,long& pos) const;
00068   StringC OnTheLeftOfFirst(StringC*,long,long& pos) const;
00069   StringC OnTheLeftOfFirst(const StringC&) const;
00070   StringC OnTheRightOfLast(const StringC&) const;
00071   StringC OnTheLeftOfLast(const StringC&) const;
00072   void Delete(const StringC&);
00073   void Replace(const StringC& s1, const StringC& s2);
00074   char GetAt(long i){return m_str[i];}
00075   const char* c_str() const{return m_str;}
00076   //operator const char* () const {return m_str;}
00077   StringC& operator = (const StringC&);  
00078   StringC operator + (const StringC&);  
00079   StringC operator + (const char&);  
00080   StringC& operator += (const StringC&);  
00081   StringC& operator += (const char&);  
00082   int operator == (const StringC&) const;
00083   int operator != (const StringC&) const;
00084   int operator > (const StringC&) const;
00085   int operator < (const StringC&) const;
00086   int operator >= (const StringC&) const;
00087   int operator <= (const StringC&) const;
00088   void ConvertCGI();
00089   StringC InHTML();
00090   int ContainAnd(StringC*,long,short grkl = 1)const;
00091   int ContainOr(StringC*,long, short grkl = 1)const;
00092   int ContainAnd(KetteC<StringC*> kStr, short grkl = 1)const;
00093   int ContainOr(KetteC<StringC*> kStr, short grkl = 1)const;
00094   long Count(const StringC&)const;
00095   long Count(char) const;
00096   long ReadUntilFirst(StringC*,long, long& pos, StringC& sr)const;
00097   int ReadUntilFirst(const StringC& strI,long& pos,StringC& sr)const;
00098   long ReadUntilFirst(StringC*,long, long& pos)const;
00099   int ReadUntilFirst(const StringC& strI,long& pos)const;
00100 protected:
00101 //  StringC OnTheRightOfFirst(KetteC<StringC*>&,pStringC&);
00102   void Init(const char* s);
00103 protected:
00104   char *m_str;
00105   long m_len;
00106   long m_blocklen;
00107   long m_buflen;
00108 };
00109 
00110 //int operator == (const StringC&, const StringC&);
00111 //int operator == (const char*, const StringC&);
00112 //int operator == (const StringC&, const char*);
00113 OAW_DLLMAPPING StringC operator + (const StringC&, const StringC&);
00114 
00115 
00116 OAW_DLLMAPPING int CompareString( const void* elem1, const void* elem2 );
00117 
00118 OAW_END_NAMESPACE
00120 
00121 
00122 #endif
00123 
00124 
00125 
00126 
00127 
00128 
00129 
00130 

Generated on Tue Jul 29 14:24:15 2003 for Open ActiveWrl by doxygen1.3-rc2