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;
64 const char *to_ascii() const;
66 static string
from_utf16(char*);
70 string
operator+(const int) const;
71 string
operator+(const string
&) const;
73 void operator+=(const string
&);
75 void operator=(const string
&);
76 static bool is_digit(char);
78 list
<string
> split(char) const;
80 buffer
to_mem() const;
82 // void serialize(manes::ods::object_stream &ostr) { }
83 //void deserialize(manes::ods::object_stream &ostr) { }
87 /* C-style functions */
88 int strlen(const char *);
89 int strcmp(const char *, const char*);
90 int strncmp(const char *, const char*, int);
91 char *strcpy(char *, const char *);
92 char *strncpy(char *, const char *, int);
93 char *strcat(char *, const char *);
95 void *memcpy(void *, const void *, int);
96 void *memset(void *, int, int);