11 #include <initializer_list> 12 #include "boost/algorithm/string/replace.hpp" 13 #include "Arp/System/Core/BasicFormatter.hxx" 14 #include "Arp/System/Core/Impl/BasicStringFormatExceptionHandler.hpp" 16 #ifndef ARP_INSIDE_ARP_H 17 #error Never include 'BasicString.hxx' directly, just include 'Arp.h' 30 template<
class C,
class Alloc = std::allocator<C>>
35 using AllocatorTraits = std::allocator_traits<Alloc>;
47 using pointer =
typename AllocatorTraits::pointer;
49 using iterator =
typename BaseString::iterator;
69 : baseString(arg.baseString, alloc)
85 : baseString(arg.baseString, offset, count)
95 : baseString(arg.baseString, offset, count, alloc)
103 : baseString(pChars, count)
112 : baseString(pChars, count, alloc)
127 : baseString(pChars, alloc)
135 : baseString(count, c)
144 : baseString(count, c, alloc)
156 : baseString(
std::move(arg.baseString), alloc)
164 : baseString(arg, alloc)
173 : baseString(first, last, alloc)
182 : baseString(first, last, alloc)
196 : baseString(
std::move(arg))
229 this->baseString = right;
243 this->baseString = right;
252 this->baseString = c;
262 this->baseString += right;
271 this->baseString += right.baseString;
280 this->baseString += right;
289 this->baseString += c;
300 this->baseString = std::move(arg.baseString);
309 this->baseString.assign(arg);
318 this->baseString.assign(arg.baseString);
328 this->baseString.assign(arg.baseString, offset, count);
337 this->baseString.assign(arg);
346 this->baseString.assign(std::move(arg));
355 this->baseString.assign(pChars, count);
363 this->baseString.assign(pChars);
372 this->baseString.assign(count, c);
381 this->baseString.assign(first, last);
390 this->baseString.assign(first, last);
399 this->baseString.assign(first, last);
410 this->baseString.append(arg);
419 this->baseString.append(arg.baseString);
429 this->baseString.append(arg.baseString, offset, count);
438 this->baseString.append(pChars, count);
446 this->baseString.append(pChars);
455 this->baseString.append(count, c);
464 this->baseString.append(first, last);
473 this->baseString.append(first, last);
482 this->baseString.append(first, last);
494 return this->baseString.insert(where, arg);
503 this->baseString.insert(offset, arg.baseString);
515 this->baseString.insert(offset, arg.baseString, argOffset, count);
526 this->baseString.insert(offset, pChars, count);
536 this->baseString.insert(offset, pChars);
547 this->baseString.insert(offset, count, c);
557 return this->baseString.insert(where, c);
567 return this->baseString.insert(where, count, c);
577 return this->baseString.insert(where, first, last);
587 return this->baseString.insert(where, first, last);
597 return this->baseString.insert(where, first, last);
607 this->baseString.erase(offset);
617 this->baseString.erase(offset, count);
626 return this->baseString.erase(where);
635 return this->baseString.erase(first, last);
647 this->baseString.replace(first, last, chars);
658 this->baseString.replace(offset, length, arg.baseString);
671 this->baseString.replace(offset, length, arg.baseString, offsetArg, count);
683 this->baseString.replace(offset, length, pChars, offset, count);
694 this->baseString.replace(offset, length, pChars);
706 this->baseString.replace(offset, length, count, c);
717 this->baseString.replace(first, last, arg.baseString);
729 this->baseString.replace(first, last, pChars, count);
740 this->baseString.replace(first, last, pChars);
752 this->baseString.replace(first, last, count, c);
764 this->baseString.replace(first, last, first2, last2);
776 this->baseString.replace(first, last, first2, last2);
788 this->baseString.replace(first, last, first2, last2);
800 this->baseString.replace(first, last, first2, last2);
813 boost::replace_all(this->baseString, pattern.baseString, replacement.baseString);
824 return this->baseString.begin();
832 return this->baseString.begin();
840 return this->baseString.end();
848 return this->baseString.end();
857 return this->baseString.begin();
864 return this->baseString.begin();
871 return this->baseString.end();
878 return this->baseString.end();
885 return this->baseString.rbegin();
892 return this->baseString.rbegin();
899 return this->baseString.rend();
906 return this->baseString.rend();
913 return this->baseString.cbegin();
920 return this->baseString.cend();
927 return this->baseString.crbegin();
934 return this->baseString.crend();
940 this->baseString.shrink_to_fit();
947 this->baseString.push_back(c);
956 this->baseString.pop_back();
965 return this->baseString.front();
973 return this->baseString.front();
981 return this->baseString.back();
989 return this->baseString.back();
998 return this->baseString.at(offset);
1007 return this->baseString.at(offset);
1016 return this->baseString[offset];
1025 return this->baseString[offset];
1039 return this->baseString.length();
1051 return this->baseString.size();
1057 return this->baseString.max_size();
1069 return this->baseString.capacity();
1076 return this->baseString.empty();
1087 this->baseString.resize(newSize);
1099 this->baseString.resize(newSize, c);
1111 this->baseString.reserve(newCapacity);
1117 this->baseString.clear();
1128 return this->baseString.find(pattern.baseString, offset);
1138 return this->baseString.find(pChars, offset, count);
1147 return this->baseString.find(pChars, offset);
1156 return this->baseString.find(c, offset);
1165 return this->baseString.rfind(pattern.baseString, offset);
1175 return this->baseString.rfind(pChars, offset, count);
1184 return this->baseString.rfind(pChars, offset);
1193 return this->baseString.rfind(c, offset);
1202 return this->baseString.find_first_of(chars.baseString, offset);
1212 return this->baseString.find_first_of(pChars, offset, count);
1221 return this->baseString.find_first_of(pChars, offset);
1231 return this->baseString.find_first_of(c, offset);
1240 return this->baseString.find_last_of(chars.baseString, offset);
1250 return this->baseString.find_last_of(pChars, offset, count);
1259 return this->baseString.find_last_of(pChars, offset);
1269 return this->baseString.find_last_of(c, offset);
1278 return this->baseString.find_first_not_of(chars.baseString, offset);
1288 return this->baseString.find_first_not_of(pChars, offset, count);
1297 return this->baseString.find_first_not_of(pChars, offset);
1307 return this->baseString.find_first_not_of(c, offset);
1316 return this->baseString.find_last_not_of(chars.baseString, offset);
1326 return this->baseString.find_last_not_of(pChars, offset, count);
1335 return this->baseString.find_last_not_of(pChars, offset);
1345 return this->baseString.find_last_not_of(c, offset);
1359 return this->baseString.compare(other.baseString);
1373 return this->baseString.compare(offset, count, other.baseString);
1389 return this->baseString.compare(offset, count, other.baseString, offsetOther, countOther);
1401 return this->baseString.compare(pOther);
1415 return this->baseString.compare(offset, count, pOther);
1430 return this->baseString.compare(offset, count, pOther, countOther);
1440 return this->
Find(pChars) == 0;
1448 return this->
Find(pattern) == 0;
1456 template<
typename... Args>
1466 template<
typename... Args>
1477 return this->baseString;
1484 return this->baseString.c_str();
1491 return this->baseString.data();
1498 return this->baseString;
1507 return SelfType(this->baseString.substr(offset, count));
1514 return this->baseString.get_allocator();
1521 this->baseString.swap(other.baseString);
1536 template <
class CharType,
class Alloc>
1539 template <
class CharType,
class Alloc>
1548 template<
class CharType,
class Alloc>
1558 template<
class CharType,
class Alloc>
1559 inline std::ostream& operator<<(std::ostream& os, const BasicString<CharType, Alloc>& right)
1561 os << right.GetBaseString();
1569 template<
class CharType,
class Alloc>
1572 std::basic_string<CharType, std::char_traits<CharType>, Alloc> baseString;
1574 right.Assign(baseString);
1582 template<
class CharType,
class Alloc>
1587 return left.GetBaseString() + right.GetBaseString();
1594 template<
class CharType,
class Alloc>
1599 return left + right.GetBaseString();
1606 template<
class CharType,
class Alloc>
1611 return left + right.GetBaseString();
1618 template<
class CharType,
class Alloc>
1623 return left.GetBaseString() + right;
1630 template<
class CharType,
class Alloc>
1635 return left.GetBaseString() + right;
1642 template<
class CharType,
class Alloc>
1647 return left.GetBaseString() + right.GetBaseString();
1654 template<
class CharType,
class Alloc>
1659 return (std::move(left.Append(right)));
1666 template<
class CharType,
class Alloc>
1671 return left.GetBaseString() + right.GetBaseString();
1678 template<
class CharType,
class Alloc>
1683 return left + right.GetBaseString();
1690 template<
class CharType,
class Alloc>
1695 return left + right.GetBaseString();
1702 template<
class CharType,
class Alloc>
1707 return left.GetBaseString() + right;
1714 template<
class CharType,
class Alloc>
1719 return left.GetBaseString() + right;
1726 template<
class CharType,
class Alloc>
1731 return left.GetBaseString() == right.GetBaseString();
1738 template<
class CharType,
class Alloc>
1743 return left == right.GetBaseString();
1750 template<
class CharType,
class Alloc>
1755 return left.GetBaseString() == right;
1762 template<
class CharType,
class Alloc>
1767 return (!(left == right));
1774 template<
class CharType,
class Alloc>
1779 return (!(left == right));
1786 template<
class CharType,
class Alloc>
1791 return (!(left == right));
1798 template<
class CharType,
class Alloc>
1803 return left.GetBaseString() < right.GetBaseString();
1810 template<
class CharType,
class Alloc>
1815 return left < right.GetBaseString();
1822 template<
class CharType,
class Alloc>
1827 return left.GetBaseString() < right;
1834 template<
class CharType,
class Alloc>
1839 return (right < left);
1846 template<
class CharType,
class Alloc>
1851 return (right < left);
1858 template<
class CharType,
class Alloc>
1863 return (right < left);
1870 template<
class CharType,
class Alloc>
1875 return (!(right < left));
1882 template<
class CharType,
class Alloc>
1887 return (!(right < left));
1894 template<
class CharType,
class Alloc>
1899 return (!(right < left));
1906 template<
class CharType,
class Alloc>
1911 return (!(left < right));
1918 template<
class CharType,
class Alloc>
1923 return (!(left < right));
1930 template<
class CharType,
class Alloc>
1935 return (!(left < right));
1948 template<
class C,
class Alloc>
const_reverse_iterator ReverseBegin() const
Returns the begin iterator of this string for reverse iterating.
Definition: BasicString.hxx:890
BasicString(const CharType *pChars, size_type count, const Allocator &alloc)
This constructor copies the as argument passed C-string.
Definition: BasicString.hxx:111
BasicString()=default
The default constructor constructs an empty string instance.
BasicString< CharType, Alloc > operator+(const BasicString< CharType, Alloc > &left, const BasicString< CharType, Alloc > &right)
Concatenates the right string to the left string.
Definition: BasicString.hxx:1583
BasicString(const SelfType &arg, const Allocator &alloc)
This constructor copies the as argument passed string deeply.
Definition: BasicString.hxx:68
size_type FindLastOf(CharType c, size_type offset=NPos) const
Finds the last occurence of character c .
Definition: BasicString.hxx:1267
size_type Size() const
Returns the number of char elements in this string.
Definition: BasicString.hxx:1049
static SelfType Format(const char *format, const Args &... args)
Formats the format C-string using the .NET/Python syntax with the given variadic arguments...
Definition: BasicString.hxx:1467
static const size_type NPos
This position value is returned when find operations do not match, or is used as default value for an...
Definition: BasicString.hxx:208
SelfType & Assign(const SelfType &arg)
This operation copies the the argument to this string.
Definition: BasicString.hxx:316
std::istream & operator>>(std::istream &is, BasicString< CharType, Alloc > &right)
Streams the instream is into the right string.
Definition: BasicString.hxx:1570
iterator Begin()
Returns the begin iterator of this string.
Definition: BasicString.hxx:855
SelfType & Replace(const_iterator first, const_iterator last, const CharType *pChars, size_type count)
Replaces a range of chars [first;last).
Definition: BasicString.hxx:727
SelfType & Replace(const_iterator first, const_iterator last, const CharType *pChars)
Replaces a range of chars [first;last).
Definition: BasicString.hxx:738
SelfType & operator+=(const CharType *right)
This assignment operator appends the the right-hand-side operand to this string.
Definition: BasicString.hxx:278
SelfType & operator+=(const SelfType &right)
This assignment operator appends the the right-hand-side operand to this string.
Definition: BasicString.hxx:269
size_type FindLastNotOf(CharType c, size_type offset=NPos) const
Finds the last occurence of any character which is not equal to c .
Definition: BasicString.hxx:1343
SelfType & Replace(const_iterator first, const_iterator last, iterator first2, iterator last2)
Replaces a range of chars [first;last).
Definition: BasicString.hxx:762
size_type Find(const CharType *pChars, size_type offset=0) const
Finds the first substring which equal to pChars .
Definition: BasicString.hxx:1145
static const SelfType NewLine
This static string instance represents the (platform specific) new line string.
Definition: BasicString.hxx:216
SelfType & Replace(const_iterator first, const_iterator last, size_type count, CharType c)
Replaces a range of chars [first;last).
Definition: BasicString.hxx:750
bool operator!=(const BasicString< CharType, Alloc > &left, const BasicString< CharType, Alloc > &right)
Compares the left string to the right string on inequality.
Definition: BasicString.hxx:1763
SelfType & Insert(size_type offset, const CharType *pChars)
This operation inserts the as argument passed string.
Definition: BasicString.hxx:534
SelfType & Erase(size_type offset, size_type count)
This operation erases chars from this string.
Definition: BasicString.hxx:615
const_reference Back() const
Returns a const reference to the last character in the string.
Definition: BasicString.hxx:987
SelfType & Append(size_type count, CharType c)
Appends to this string count consecutive copies of character c .
Definition: BasicString.hxx:453
SelfType & Replace(size_type offset, size_type length, const CharType *pChars, size_type count)
Replaces a range of chars.
Definition: BasicString.hxx:681
typename BaseString::const_reference const_reference
The const reference type of this type.
Definition: BasicString.hxx:46
BasicString(std::initializer_list< CharType > arg, const Allocator &alloc=Allocator())
Copies each of the characters in initList , in the same order.
Definition: BasicString.hxx:163
~BasicString()=default
The destructor deallocates all memory of this instance.
size_type MaxSize() const
Returns the number maximum size any string might have.
Definition: BasicString.hxx:1055
int Compare(size_type offset, size_type count, const CharType *pOther) const
Compares this string to the pOther string lexicographical.
Definition: BasicString.hxx:1413
SelfType & Replace(size_type offset, size_type length, const SelfType &arg, size_type offsetArg, size_type count=NPos)
Replaces a range of chars.
Definition: BasicString.hxx:669
size_type FindLastOf(const CharType *pChars, size_type offset, size_type count) const
Finds the last occurence of any character in pChars .
Definition: BasicString.hxx:1248
SelfType & operator=(SelfType &&right) noexcept=default
This move assignment operator moves the right-hand-side operand to this string.
SelfType & Assign(SelfType &&arg)
This operation moves the as argument passed string to this string.
Definition: BasicString.hxx:298
int Compare(size_type offset, size_type count, const SelfType &other, size_type offsetOther, size_type countOther=NPos) const
Compares a substring of this string to a substring of the other string lexicographical.
Definition: BasicString.hxx:1387
SelfType & Assign(const_pointer first, const_pointer last)
Copies the sequence of characters in the range [first,last), in the same order.
Definition: BasicString.hxx:397
SelfType & Append(std::initializer_list< CharType > arg)
This operation appends each of the characters in the argument to this string, in the same order...
Definition: BasicString.hxx:408
int Compare(size_type offset, size_type count, const SelfType &other) const
Compares this string to the other string lexicographical.
Definition: BasicString.hxx:1371
SelfType & Append(const_iterator first, const_iterator last)
Appends the sequence of characters in the range [first,last), in the same order.
Definition: BasicString.hxx:471
reference Back()
Returns a reference to the last character in the string.
Definition: BasicString.hxx:979
SelfType & Assign(const BaseString &arg)
This operation copies the argument to this string.
Definition: BasicString.hxx:335
Namespace of the C++ standard library
typename BaseString::const_iterator const_iterator
The const iterator type of this type.
Definition: BasicString.hxx:50
SelfType Substr(size_type offset=0, size_type count=NPos) const
Gets a substring of this string.
Definition: BasicString.hxx:1505
size_type ReverseFind(CharType c, size_type offset=NPos) const
Finds the last char which equal to c .
Definition: BasicString.hxx:1191
const_iterator End() const
Returns the end iterator of this string.
Definition: BasicString.hxx:876
size_type FindFirstOf(const CharType *pChars, size_type offset, size_type count) const
Finds the first occurence of any character in pChars .
Definition: BasicString.hxx:1210
Definition: BasicFormatter.hxx:18
typename BaseString::const_reverse_iterator const_reverse_iterator
The const reverse iterator type of this type.
Definition: BasicString.hxx:52
BasicString(const SelfType &arg, size_type offset, size_type count, const Allocator &alloc)
This constructor copies the as argument passed string partially.
Definition: BasicString.hxx:94
size_type FindFirstOf(const CharType *pChars, size_type offset=0) const
Finds the first occurence of any character in pChars .
Definition: BasicString.hxx:1219
Allocator allocator_type
The allocator type of this type.
Definition: BasicString.hxx:41
iterator end()
Returns the end iterator of this string.
Definition: BasicString.hxx:838
bool operator>(const BasicString< CharType, Alloc > &left, const BasicString< CharType, Alloc > &right)
Compares the left string to the right string.
Definition: BasicString.hxx:1835
iterator Insert(const_iterator where, const_iterator first, const_iterator last)
Inserts a range of chars [first;last) at position where .
Definition: BasicString.hxx:585
const_iterator ConstEnd() const
Returns the end iterator of this const string.
Definition: BasicString.hxx:918
bool operator<(const BasicString< CharType, Alloc > &left, const BasicString< CharType, Alloc > &right)
Compares the left string to the right string.
Definition: BasicString.hxx:1799
bool StartWith(const SelfType &pattern) const
Determines if this string starts with the pattern string.
Definition: BasicString.hxx:1446
typename AllocatorTraits::const_pointer const_pointer
The const pointer type of this type.
Definition: BasicString.hxx:48
size_type FindFirstOf(const SelfType &chars, size_type offset=0) const
Finds the first occurence of any character in chars .
Definition: BasicString.hxx:1200
int Compare(const SelfType &other) const
Compares this string to the other string lexicographical.
Definition: BasicString.hxx:1357
size_type FindFirstOf(CharType c, size_type offset=0) const
Finds the first occurence of character c .
Definition: BasicString.hxx:1229
size_t result_type
The result type of this functor class (stl policy type)
Definition: BasicString.hxx:1958
size_type FindLastOf(const SelfType &chars, size_type offset=NPos) const
Finds the last occurence of any character in chars .
Definition: BasicString.hxx:1238
reference At(size_type offset)
Returns a const reference to the character at position offset .
Definition: BasicString.hxx:996
size_type Find(CharType c, size_type offset=0) const
Finds the first char which equal to c .
Definition: BasicString.hxx:1154
void Reserve(size_type newCapacity=0)
Reserves memory upto the specified newCapacity .
Definition: BasicString.hxx:1109
const CharType * CStr() const
Gets the character data of this string.
Definition: BasicString.hxx:1482
SelfType & Append(const_pointer first, const_pointer last)
Appends the sequence of characters in the range [first,last), in the same order.
Definition: BasicString.hxx:480
void Swap(SelfType &other)
Swaps the content of this string with the content of the other string.
Definition: BasicString.hxx:1519
const BaseString & GetBaseString() const
Gets the basic std string.
Definition: BasicString.hxx:1475
iterator Insert(const_iterator where, const_pointer first, const_pointer last)
Inserts a range of chars [first;last) at position where .
Definition: BasicString.hxx:595
size_type Find(const SelfType &pattern, size_type offset=0) const
Finds the first substring which equal to pattern .
Definition: BasicString.hxx:1126
reverse_iterator ReverseBegin()
Returns the begin iterator of this string for reverse iterating.
Definition: BasicString.hxx:883
SelfType & Erase(size_type offset=0)
This operation erases chars from this string.
Definition: BasicString.hxx:605
size_type FindLastNotOf(const CharType *pChars, size_type offset=NPos) const
Finds the last occurence of any character which is not in pChars .
Definition: BasicString.hxx:1333
bool IsEmpty() const
Determines if this string is empty.
Definition: BasicString.hxx:1074
typename BaseString::reference reference
The reference type of this type.
Definition: BasicString.hxx:45
SelfType & operator+=(CharType c)
This assignment operator appends the the right-hand-side operand to this string.
Definition: BasicString.hxx:287
SelfType & Append(const SelfType &arg)
This operation appends the the argument to this string.
Definition: BasicString.hxx:417
typename BaseString::reverse_iterator reverse_iterator
The reverse iterator type of this type.
Definition: BasicString.hxx:51
void Resize(size_type newSize, CharType c)
Resizes this string to the specified new size.
Definition: BasicString.hxx:1097
CharType value_type
The char type of this type.
Definition: BasicString.hxx:42
iterator Insert(const_iterator where, size_type count, CharType c)
Inserts character c at position where .
Definition: BasicString.hxx:565
static const SelfType Empty
An emtpy static string instance.
Definition: BasicString.hxx:212
SelfType & Replace(const_iterator first, const_iterator last, const_pointer first2, const_pointer last2)
Replaces a range of chars [first;last).
Definition: BasicString.hxx:786
void ShrinkToFit()
Reduces the capacity of this string to its size.
Definition: BasicString.hxx:938
iterator Erase(const_iterator first, const_iterator last)
Erases a range of chars [first;last).
Definition: BasicString.hxx:633
BasicString(size_type count, CharType c)
Fills the string with count consecutive copies of character c .
Definition: BasicString.hxx:134
size_type FindFirstNotOf(const CharType *pChars, size_type offset=0) const
Finds the first occurence of any character which is not in pChars .
Definition: BasicString.hxx:1295
Allocator GetAllocator() const
Gets the allocator of this string.
Definition: BasicString.hxx:1512
BasicString(const_iterator first, const_iterator last, const Allocator &alloc=Allocator())
Copies the sequence of characters in the range [first,last), in the same order..
Definition: BasicString.hxx:181
reference operator[](size_type offset)
Returns a reference to the character at position offset .
Definition: BasicString.hxx:1014
void PushBack(CharType c)
Appends the character c to this string.
Definition: BasicString.hxx:945
typename AllocatorTraits::pointer pointer
The pointer type of this type.
Definition: BasicString.hxx:47
bool StartWith(const CharType *pChars) const
Determines if this string starts with the pChars C-string.
Definition: BasicString.hxx:1438
iterator Erase(const_iterator where)
This operation erases chars from this string.
Definition: BasicString.hxx:624
void Clear()
Clears the content of this string, but does not modify the capacity.
Definition: BasicString.hxx:1115
size_type ReverseFind(const SelfType &pattern, size_type offset=NPos) const
Finds the last substring which equal to pattern .
Definition: BasicString.hxx:1163
iterator End()
Returns the end iterator of this string.
Definition: BasicString.hxx:869
BasicString(size_type count, CharType c, const Allocator &alloc)
Fills the string with count consecutive copies of character c .
Definition: BasicString.hxx:143
size_type Find(const CharType *pChars, size_type offset, size_type count) const
Finds the first substring which equal to pChars .
Definition: BasicString.hxx:1136
size_type ReverseFind(const CharType *pChars, size_type offset=NPos) const
Finds the last substring which equal to pChars .
Definition: BasicString.hxx:1182
size_type Length() const
Returns the number of char elements in this string.
Definition: BasicString.hxx:1037
void Resize(size_type newSize)
Resizes this string to the specified new size.
Definition: BasicString.hxx:1085
SelfType & Assign(std::initializer_list< CharType > arg)
This operation copies each of the characters in the argument to this string, in the same order...
Definition: BasicString.hxx:307
void swap(BasicString< CharType, Alloc > &left, BasicString< CharType, Alloc > &right)
Swaps the content of the left string with the content of the right string.
Definition: BasicString.hxx:1549
size_type FindFirstNotOf(CharType c, size_type offset=0) const
Finds the first occurence of any character which is not equal to c .
Definition: BasicString.hxx:1305
char CharType
The character type.
Definition: BasicString.hxx:36
int Compare(size_type offset, size_type count, const CharType *pOther, size_type countOther) const
Compares a substring of this string to a substring of the pOther string lexicographical.
Definition: BasicString.hxx:1428
SelfType & ReplaceAll(const SelfType &pattern, const SelfType &replacement)
Replaces a given pattern by a replacement string.
Definition: BasicString.hxx:811
size_type ReverseFind(const CharType *pChars, size_type offset, size_type count) const
Finds the last substring which equal to pChars .
Definition: BasicString.hxx:1173
SelfType & Append(const SelfType &arg, size_type offset, size_type count=NPos)
This operation appends the as argument passed string partially.
Definition: BasicString.hxx:427
static SelfType Format(const SelfType &format, const Args &... args)
Formats the format string using the .NET/Python syntax with the given variadic arguments.
Definition: BasicString.hxx:1457
BasicString(BaseString &&arg)
This move constructor moves the as argument passed std::string to this string.
Definition: BasicString.hxx:195
size_type FindLastOf(const CharType *pChars, size_type offset=NPos) const
Finds the last occurence of any character in pChars .
Definition: BasicString.hxx:1257
iterator begin()
Returns the begin iterator of this string.
Definition: BasicString.hxx:822
BasicString(const Allocator &alloc)
This constructor creates an empty string instance.
Definition: BasicString.hxx:75
size_type FindFirstNotOf(const CharType *pChars, size_type offset, size_type count) const
Finds the first occurence of any character which is not in pChars .
Definition: BasicString.hxx:1286
SelfType & Insert(size_type offset, const CharType *pChars, size_type count)
This operation inserts the as argument passed string partially.
Definition: BasicString.hxx:524
BasicString(iterator first, iterator last, const Allocator &alloc=Allocator())
Copies the sequence of characters in the range [first,last), in the same order..
Definition: BasicString.hxx:172
Root namespace for the PLCnext API
size_type Capacity() const
Rceturns the capacity of this string.
Definition: BasicString.hxx:1067
SelfType & operator=(const CharType *right)
This assignment operator copies the right-hand-side operand to this string.
Definition: BasicString.hxx:241
SelfType & Replace(const_iterator first, const_iterator last, std::initializer_list< CharType > chars)
Replaces a range of chars [first;last).
Definition: BasicString.hxx:645
SelfType & Replace(size_type offset, size_type length, const SelfType &arg)
Replaces a range of chars.
Definition: BasicString.hxx:656
const_reverse_iterator ConstReverseEnd() const
Returns the end iterator of this const string for reverse iterating.
Definition: BasicString.hxx:932
SelfType & operator=(CharType c)
This assignment operator copies the right-hand-side operand to this string.
Definition: BasicString.hxx:250
Arp::BasicString< C, Alloc > argument_type
The argument type of this functor class (stl policy type)
Definition: BasicString.hxx:1956
const_iterator begin() const
Returns the begin iterator of this string.
Definition: BasicString.hxx:830
SelfType & Replace(const_iterator first, const_iterator last, const_iterator first2, const_iterator last2)
Replaces a range of chars [first;last).
Definition: BasicString.hxx:774
reverse_iterator ReverseEnd()
Returns the end iterator of this string for reverse iterating.
Definition: BasicString.hxx:897
SelfType & Append(const CharType *pChars, size_type count)
This operation appends the as argument passed C-string partially.
Definition: BasicString.hxx:436
size_type FindLastNotOf(const CharType *pChars, size_type offset, size_type count) const
Finds the last occurence of any character which is not in pChars .
Definition: BasicString.hxx:1324
bool operator==(const BasicString< CharType, Alloc > &left, const BasicString< CharType, Alloc > &right)
Compares the left string to the right string on equality.
Definition: BasicString.hxx:1727
const_iterator end() const
Returns the end iterator of this string.
Definition: BasicString.hxx:846
SelfType & Assign(iterator first, iterator last)
Copies the sequence of characters in the range [first,last), in the same order.
Definition: BasicString.hxx:379
BasicString< CharType, Allocator > SelfType
The self type.
Definition: BasicString.hxx:37
SelfType & Append(const CharType *pChars)
This operation appends the as argument passed C-string.
Definition: BasicString.hxx:444
SelfType & Replace(const_iterator first, const_iterator last, pointer first2, pointer last2)
Replaces a range of chars [first;last).
Definition: BasicString.hxx:798
SelfType & Insert(size_type offset, const SelfType &arg)
This operation inserts the the argument at the given position.
Definition: BasicString.hxx:501
bool operator>=(const BasicString< CharType, Alloc > &left, const BasicString< CharType, Alloc > &right)
Compares the left string to the right string.
Definition: BasicString.hxx:1907
const_reverse_iterator ReverseEnd() const
Returns the end iterator of this string for reverse iterating.
Definition: BasicString.hxx:904
const_reference Front() const
Returns a const reference to the first character in the string.
Definition: BasicString.hxx:971
iterator Insert(const_iterator where, iterator first, iterator last)
Inserts a range of chars [first;last) at position where .
Definition: BasicString.hxx:575
SelfType & Insert(size_type offset, size_type count, CharType c)
Inserts count consecutive copies of character c at position offset .
Definition: BasicString.hxx:545
SelfType & Replace(size_type offset, size_type length, size_type count, CharType c)
Replaces a range of chars by a character.
Definition: BasicString.hxx:704
SelfType & Assign(const_iterator first, const_iterator last)
Copies the sequence of characters in the range [first,last), in the same order.
Definition: BasicString.hxx:388
const_iterator Begin() const
Returns the begin iterator of this string.
Definition: BasicString.hxx:862
const_reference operator[](size_type offset) const
Returns a const reference to the character at position offset .
Definition: BasicString.hxx:1023
size_type FindLastNotOf(const SelfType &chars, size_type offset=NPos) const
Finds the last occurence of any character which is not in chars .
Definition: BasicString.hxx:1314
const_iterator ConstBegin() const
Returns the begin iterator of this const string.
Definition: BasicString.hxx:911
typename BaseString::iterator iterator
The iterator type of this type.
Definition: BasicString.hxx:49
BasicString(const CharType *pChars, const Allocator &alloc)
This constructor copies the as argument passed C-string.
Definition: BasicString.hxx:126
SelfType & Assign(const SelfType &arg, size_type offset, size_type count=NPos)
This operation copies the as argument passed string partially.
Definition: BasicString.hxx:326
SelfType & operator+=(std::initializer_list< CharType > right)
This assignment operator appends each of the characters in the right-hand-side operand to this string...
Definition: BasicString.hxx:260
result_type operator()(const argument_type &key) const
This functor operator returns the hash value of the as argument passed string.
Definition: BasicString.hxx:1964
std::basic_string< CharType, std::char_traits< CharType >, Allocator > BaseString
The type of the basic std string.
Definition: BasicString.hxx:38
BasicString(const BaseString &arg)
This copy constructor copies the as argument passed std::string to this string.
Definition: BasicString.hxx:188
int Compare(const CharType *pOther) const
Compares this string to the pOther string lexicographical.
Definition: BasicString.hxx:1399
SelfType & Assign(BaseString &&arg)
This operation moves the argument to this string.
Definition: BasicString.hxx:344
BasicString(const CharType *pChars, size_type count)
This constructor copies the as argument passed C-string.
Definition: BasicString.hxx:102
typename BaseString::difference_type difference_type
The difference type of this type.
Definition: BasicString.hxx:44
SelfType & Replace(const_iterator first, const_iterator last, const SelfType &arg)
Replaces a range of chars [first;last).
Definition: BasicString.hxx:715
SelfType & Append(iterator first, iterator last)
Appends the sequence of characters in the range [first,last), in the same order.
Definition: BasicString.hxx:462
SelfType & Insert(size_type offset, const SelfType &arg, size_type argOffset, size_type count=NPos)
This operation inserts the as argument passed string partially.
Definition: BasicString.hxx:513
typename BaseString::size_type size_type
The size type of this type.
Definition: BasicString.hxx:43
SelfType & Assign(const CharType *pChars, size_type count)
This operation copies the as argument passed C-string partially.
Definition: BasicString.hxx:353
void PopBack()
Removes the character at the end of this string.
Definition: BasicString.hxx:952
BasicString(const CharType *pChars)
This constructor copies the as argument passed C-string.
Definition: BasicString.hxx:118
iterator Insert(const_iterator where, CharType c)
Inserts character c at position where .
Definition: BasicString.hxx:555
iterator Insert(const_iterator where, std::initializer_list< CharType > arg)
This operation inserts each of the characters in the argument to this string, in the same order...
Definition: BasicString.hxx:492
SelfType & Replace(size_type offset, size_type length, const CharType *pChars)
Replaces a range of chars.
Definition: BasicString.hxx:692
SelfType & Assign(const CharType *pChars)
This operation copies the as argument passed C-string.
Definition: BasicString.hxx:361
SelfType & operator=(std::initializer_list< CharType > right)
This assignment operator copies each of the characters in the right-hand-side operand to this string...
Definition: BasicString.hxx:227
const_reference At(size_type offset) const
Returns a const reference to the character at position offset .
Definition: BasicString.hxx:1005
SelfType & Assign(size_type count, CharType c)
Fills this string with count consecutive copies of character c .
Definition: BasicString.hxx:370
size_type FindFirstNotOf(const SelfType &chars, size_type offset=0) const
Finds the first occurence of any character which is not in chars .
Definition: BasicString.hxx:1276
reference Front()
Returns a reference to the first character in the string.
Definition: BasicString.hxx:963
bool operator<=(const BasicString< CharType, Alloc > &left, const BasicString< CharType, Alloc > &right)
Compares the left string to the right string.
Definition: BasicString.hxx:1871
std::allocator< char > Allocator
The characters allocator type.
Definition: BasicString.hxx:34
const_reverse_iterator ConstReverseBegin() const
Returns the begin iterator of this const string for reverse iterating.
Definition: BasicString.hxx:925
BasicString(SelfType &&arg, const Allocator &alloc)
This move constructor moves the as argument passed string to this string.
Definition: BasicString.hxx:155
BasicString(const SelfType &arg, size_type offset, size_type count=NPos)
This constructor copies the as argument passed string partially.
Definition: BasicString.hxx:84