27 #ifndef TIXML_STRING_INCLUDED 28 #define TIXML_STRING_INCLUDED 37 #if defined(_MSC_VER) && (_MSC_VER >= 1200 ) 39 #define TIXML_EXPLICIT explicit 40 #elif defined(__GNUC__) && (__GNUC__ >= 3 ) 42 #define TIXML_EXPLICIT explicit 44 #define TIXML_EXPLICIT 62 static const size_type
npos;
80 init( static_cast<size_type>( strlen(copy) ));
88 memcpy(
start(), str, len);
99 return assign( copy, (size_type)strlen(copy));
111 return append(suffix, static_cast<size_type>( strlen(suffix) ));
117 return append(&single, 1);
147 const char&
at (size_type index)
const 149 assert( index <
length() );
156 assert( index <
length() );
161 size_type
find (
char lookup)
const 163 return find(lookup, 0);
167 size_type
find (
char tofind, size_type offset)
const 171 for (
const char* p =
c_str() + offset; *p !=
'\0'; ++p)
173 if (*p == tofind)
return static_cast< size_type
>( p -
c_str() );
217 void init(size_type sz, size_type cap)
226 const size_type bytesNeeded =
sizeof(
Rep) + cap;
227 const size_type intsNeeded = ( bytesNeeded +
sizeof(int) - 1 ) /
sizeof( int );
228 rep_ =
reinterpret_cast<Rep*
>(
new int[ intsNeeded ] );
245 delete [] (
reinterpret_cast<int*
>(
rep_ ) );
304 #endif // TIXML_STRING_INCLUDED 305 #endif // TIXML_USE_STL static const size_type npos
bool operator>(const TiXmlString &a, const TiXmlString &b)
size_type find(char tofind, size_type offset) const
void swap(TiXmlString &other)
TiXmlString operator+(const TiXmlString &a, const TiXmlString &b)
bool operator<(const TiXmlString &a, const TiXmlString &b)
TiXmlString(const TiXmlString ©)
TiXmlString & operator+=(const char *suffix)
TIXML_EXPLICIT TiXmlString(const char *str, size_type len)
size_type capacity() const
char & operator[](size_type index) const
TiXmlString & assign(const char *str, size_type len)
const char & at(size_type index) const
TiXmlString & operator=(const char *copy)
void reserve(size_type cap)
void set_size(size_type sz)
size_type find(char lookup) const
const char * c_str() const
bool operator==(const TiXmlString &a, const TiXmlString &b)
TiXmlString & append(const char *str, size_type len)
bool operator>=(const TiXmlString &a, const TiXmlString &b)
TIXML_EXPLICIT TiXmlString(const char *copy)
bool operator!=(const TiXmlString &a, const TiXmlString &b)
const char * data() const
bool operator<=(const TiXmlString &a, const TiXmlString &b)
std::ostream & operator<<(std::ostream &, Catch_global_namespace_dummy)
void init(size_type sz, size_type cap)