22 #ifndef ULTIMA_STD_STRING_H 23 #define ULTIMA_STD_STRING_H 25 #include "common/str.h" 32 typedef size_t size_type;
42 char &operator*()
const {
return (*_owner)[_index]; }
55 return _owner == rhs._owner && _index == rhs._index;
58 return !operator==(rhs);
71 size_t length()
const {
return size(); }
76 void assign(
const char *s,
size_t count = npos) {
82 void assign(
const string &s,
size_t count = npos) {
86 *
this =
string(s.c_str(), count);
101 return Common::String::operator[](idx);
109 virtual int Compare(
const string &s)
const {
116 void resize(
size_t count);
118 void insert(
size_t pos,
size_t n,
char c) {
119 for (uint idx = 0; idx < n; ++idx)
134 void append(
const string &str,
size_t theSize = npos) {
155 bool operator==(
const string &x)
const {
159 bool operator==(
const char *x)
const {
163 bool operator!=(
const string &x)
const {
164 return Compare(x) != 0;
167 bool operator !=(
const char *x)
const {
168 return Compare(x) != 0;
172 extern const char *
const endl;
void resize(size_t count)
void insertChar(value_type c, uint32 p)
void push_back(char c)
Definition: string.h:144
char operator[](size_t idx) const
Definition: string.h:100
Definition: detection.h:27
char & operator[](size_t idx)
Definition: string.h:92
void append(size_t n, char c)
Definition: string.h:126
uint32 _size
Definition: str-base.h:54
char at(size_t idx)
Definition: string.h:107
value_type * _str
Definition: str-base.h:60
Definition: algorithm.h:37
void append(const string &str, size_t theSize=npos)
Definition: string.h:134
void assign(const char *s, size_t count=npos)
Definition: string.h:76