1 // String.H -*- C++ -*-
2 // Copyright (c) 1997, 1998 Etienne BERNARD
3 // Copyright (c) 2002.2003,2005 Clinton Ebadi
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 std::string my_string;
32 String(const String &);
33 String(const std::string &);
37 String & operator=(const char *);
38 String & operator=(const String &);
39 String & operator=(const std::string &);
48 String subString(int);
49 String subString(int, int);
52 String substr(int, int);
59 char & operator[](int);
60 const char & operator[](int) const;
62 bool operator==(const char *) const;
63 bool operator==(const String &) const;
64 bool operator==(const std::string &) const;
66 bool operator!=(const char *) const;
67 bool operator!=(const String &) const;
68 bool operator!=(const std::string &) const;
70 bool operator<(const String &) const;
71 bool operator>(const String &) const;
72 bool operator<(const std::string &) const;
74 bool operator<=(const String &) const;
75 bool operator<=(const std::string &) const;
76 bool operator>=(const String &) const;
77 bool operator>=(const std::string &) const;
79 String operator+(const char *);
80 String operator+(const String &);
81 String operator+(const std::string &);
83 friend std::string operator+(const std::string &, const String &);
85 const char* c_str () const;
86 operator std::string () const;
88 friend std::ostream & operator<<(std::ostream &, const String &);
89 friend std::istream & operator>>(std::istream &, String &);
92 bool operator==(const std::string &, const String &);
93 bool operator!=(const std::string &, const String &);
94 bool operator>(const std::string &, const String &);
95 bool operator<(const std::string &, const String &);
96 bool operator<=(const std::string &, const String &);
97 bool operator>=(const std::string &, const String &);