5 * Copyright (C) 2008-2009 Pawel Dziepak
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include "libs/delegate.h"
28 /*#include "manes/obj_val.h"
29 #include "manes/object_stream.h"*/
32 class string
/*: public manes::ods::obj_val */{
38 void save(const char*);
41 string(const string
&);
43 string(const unsigned int);
44 string(const unsigned int, bool);
54 char &operator[](const int);
55 const char &operator[](const int) const;
57 bool operator==(const char*) const;
58 bool operator==(const string
&) const;
59 bool operator!=(const string
&x
) const {
60 return !operator==(x
);
63 operator const char*() const;
67 string
operator+(const int) const;
68 string
operator+(const string
&) const;
70 void operator+=(const string
&);
72 void operator=(const string
&);
73 static bool is_digit(char);
75 list
<string
> split(char) const;
77 buffer
to_mem() const;
79 // void serialize(manes::ods::object_stream &ostr) { }
80 //void deserialize(manes::ods::object_stream &ostr) { }
84 /* C-style functions */
85 int strlen(const char *);
86 int strcmp(const char *, const char*);
87 int strncmp(const char *, const char*, int);
88 char *strcpy(char *, const char *);
89 char *strncpy(char *, const char *, int);
90 char *strcat(char *, const char *);
92 void *memcpy(void *, const void *, int);
93 void *memset(void *, int, int);