Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MCString.h

00001 #if !defined(__MCSTRING_H_)
00002 #define __MCSTRING_H_
00003 
00004 #ident "@(#)$Id: MCString.h,v 1.5 2004/12/02 07:05:20 mike Exp $"
00005 
00006 /*
00007  * Copyright Miba Consulting Ltd. (c) 2000-2003
00008  * 
00009  * This library is free software; you can redistribute it and/or
00010  * modify it under the terms of the GNU Lesser General Public
00011  * License as published by the Free Software Foundation; either
00012  * version 2.1 of the License, or (at your option) any later version.
00013  * 
00014  * This library is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00017  * Lesser General Public License for more details.
00018  * 
00019  * You should have received a copy of the GNU Lesser General Public
00020  * License along with this library; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00022  *
00023  */
00024 
00025 #include "mcllib/MCBase.h"
00026 
00027 namespace mcllib
00028 {
00040     class MCString : public MCBase
00041     {
00042     public:
00044         enum EStripWsWhere {
00045             MCWSHEAD, 
00046             MCWSTAIL, 
00047             MCWSBOTH 
00050         };
00052         typedef const char* IMPLTYPE;
00054         typedef unsigned long size_t;
00059         typedef IMPLTYPE const_iterator;
00060 
00065         MCString();
00070         ~MCString();
00079         MCString(IMPLTYPE pStr);
00088         MCString(IMPLTYPE pStr, size_t length);
00093         bool operator==(const MCString& mcs) const;
00099         bool operator!=(const MCString& mcs) const;
00107         bool operator<(const MCString& mcs) const;
00118         int cmp(const MCString& mcs, bool ignoreCase = false) const;
00126         operator IMPLTYPE() const;
00131         size_t length() const;
00137         size_t size() const;
00146         IMPLTYPE c_str() const;
00151         const_iterator begin() const;
00156         const_iterator end() const;
00163         void erase();
00173         MCString substr(int start, int length = 0) const;
00182         int find(char c, int start = 0) const;
00191         int rfind(char c, int start = 0) const;
00204         void stripws(EStripWsWhere where = MCWSBOTH);
00206         unsigned long getCount() const;
00207     };
00208 };
00209 
00210 #endif

Generated on Wed Jan 12 19:05:48 2005 for MCLLIB by  doxygen 1.3.9.1