|
|
using | Allocator = A |
| | The characters allocator type.
|
| |
|
using | AllocatorTraits = std::allocator_traits< Allocator > |
| | The allocator type traits.
|
| |
|
using | CharType = C |
| | The character type.
|
| |
|
using | Char8uType = Arp::Base::Core::char8u |
| | The UTF8 character type.
|
| |
|
using | SelfType = BasicString< CharType, Allocator > |
| | The self type.
|
| |
|
using | StdString = std::basic_string< CharType, std::char_traits< CharType >, Allocator > |
| | The type of the basic std string.
|
| |
|
using | Reference = typename StdString::reference |
| | The reference type of this type.
|
| |
|
using | ConstReference = typename StdString::const_reference |
| | The const reference type of this type.
|
| |
|
using | Iterator = typename StdString::iterator |
| | The iterator type of this type.
|
| |
|
using | ConstIterator = typename StdString::const_iterator |
| | The iterator type of this type.
|
| |
|
using | ReverseIterator = typename StdString::reverse_iterator |
| | The iterator type of this type.
|
| |
|
using | ConstReverseIterator = typename StdString::const_reverse_iterator |
| | Used by Split() operations.
|
| |
|
using | Tokens = std::vector< SelfType > |
| | Used by initializing operations.
|
| |
|
using | AppendToken = std::function< void(SelfType &&) > |
| |
|
using | Bytes = std::vector< byte > |
| |
|
using | allocator_type = Allocator |
| | The allocator type of this type.
|
| |
|
using | value_type = CharType |
| | The char type of this type.
|
| |
|
using | size_type = typename StdString::size_type |
| | The size type of this type.
|
| |
|
using | difference_type = typename StdString::difference_type |
| | The difference type of this type.
|
| |
|
using | reference = typename StdString::reference |
| | The reference type of this type.
|
| |
|
using | const_reference = typename StdString::const_reference |
| | The const reference type of this type.
|
| |
|
using | pointer = typename AllocatorTraits::pointer |
| | The pointer type of this type.
|
| |
|
using | const_pointer = typename AllocatorTraits::const_pointer |
| | The const pointer type of this type.
|
| |
|
using | iterator = typename StdString::iterator |
| | The iterator type of this type.
|
| |
|
using | const_iterator = typename StdString::const_iterator |
| | The const iterator type of this type.
|
| |
|
using | reverse_iterator = typename StdString::reverse_iterator |
| | The reverse iterator type of this type.
|
| |
|
using | const_reverse_iterator = typename StdString::const_reverse_iterator |
| | The const reverse iterator type of this type.
|
| |
|
|
| BasicString (void) |
| | The default constructor constructs an empty string instance.
|
| |
| | BasicString (const SelfType &arg) |
| | The copy constructor copies the as argument passed string deeply. More...
|
| |
| | BasicString (SelfType &&arg) noexcept |
| | This move constructor moves the as argument passed string to this string. More...
|
| |
| SelfType & | operator= (const SelfType &arg) |
| | This assignment operator copies the right-hand-side operand to this string. More...
|
| |
| SelfType & | operator= (SelfType &&arg) noexcept |
| | This move assignment operator moves the right-hand-side operand to this string. More...
|
| |
|
| ~BasicString (void) |
| | The destructor deallocates all memory of this instance.
|
| |
| | BasicString (const Allocator &alloc) |
| | This constructor creates an empty string instance. More...
|
| |
| | BasicString (const Bytes &bytes, const Allocator &alloc=Allocator()) |
| | Copies the as arguments passed bytes to this string. More...
|
| |
| | BasicString (const StdString &arg) |
| | This copy constructor copies the as argument passed std::string to this string. More...
|
| |
| | BasicString (StdString &&arg) noexcept |
| | This move constructor moves the as argument passed std::string to this string. More...
|
| |
| | BasicString (const SelfType &arg, const Allocator &alloc) |
| | This constructor copies the as argument passed string deeply. More...
|
| |
| | BasicString (const SelfType &arg, size_type offset, size_type count=NPos) |
| | This constructor copies the as argument passed string partially. More...
|
| |
| | BasicString (const SelfType &arg, size_type offset, size_type count, const Allocator &alloc) |
| | This constructor copies the as argument passed string partially. More...
|
| |
| | BasicString (const CharType *pChars, size_type count) |
| | This constructor copies the as argument passed C-string. More...
|
| |
| | BasicString (const CharType *pChars, size_type count, const Allocator &alloc) |
| | This constructor copies the as argument passed C-string. More...
|
| |
| | BasicString (const CharType *pChars) |
| | This constructor copies the as argument passed C-string. More...
|
| |
| | BasicString (const Char8uType *pChars) |
| | This constructor copies the as argument passed C-string. More...
|
| |
| | BasicString (const CharType *pChars, const Allocator &alloc) |
| | This constructor copies the as argument passed C-string. More...
|
| |
| | BasicString (size_type count, CharType c) |
| | Fills the string with count consecutive copies of character c . More...
|
| |
| | BasicString (size_type count, CharType c, const Allocator &alloc) |
| | Fills the string with count consecutive copies of character c . More...
|
| |
| | BasicString (SelfType &&arg, const Allocator &alloc) |
| | This move constructor moves the as argument passed string to this string. More...
|
| |
| | BasicString (std::initializer_list< CharType > arg, const Allocator &alloc=Allocator()) |
| | Copies each of the characters in initList , in the same order. More...
|
| |
| | BasicString (Iterator first, Iterator last, const Allocator &alloc=Allocator()) |
| | Copies the sequence of characters in the range [first,last), in the same order.. More...
|
| |
| | BasicString (ConstIterator first, ConstIterator last, const Allocator &alloc=Allocator()) |
| | Copies the sequence of characters in the range [first,last), in the same order.. More...
|
| |
| SelfType & | ReplaceAll (const SelfType &pattern, const SelfType &replacement) |
| | Replaces a given pattern by a replacement string. More...
|
| |
| Allocator | GetAllocator (void) const |
| | Gets the allocator of this string. More...
|
| |
| StdString & | GetStdString (void) |
| | Gets the basic std string. More...
|
| |
|
const StdString & | GetStdString (void) const |
| |
|
SelfType | TrimLeft (void) const |
| |
|
SelfType | TrimLeft (CharType trim) const |
| |
|
SelfType | TrimRight (void) const |
| |
|
SelfType | TrimRight (CharType trim) const |
| |
|
SelfType | Trim (void) const |
| |
|
SelfType | Trim (CharType trim) const |
| |
| Tokens | Split (CharType delimiter, bool trimTokens=true, bool removeEmptyTokens=true) const |
| | Splits this string into tokens using the specified delimiter characters (multiple). More...
|
| |
| Tokens | Split (std::span< const CharType > delimiters, bool trimTokens=true, bool removeEmptyTokens=true) const |
| | Splits this string into tokens using the specified delimiter characters (multiple). More...
|
| |
| Tokens | SplitByWord (const SelfType &delimiter, bool trimTokens=true, bool removeEmptyTokens=true) const |
| | Splits this string into tokens using the specified (single) delimiter string. More...
|
| |
|
void | Split (CharType delimiter, bool trimTokens, bool removeEmptyTokens, AppendToken appendToken) const |
| |
|
void | Split (std::span< const CharType > delimiters, bool trimTokens, bool removeEmptyTokens, AppendToken appendToken) const |
| |
|
void | SplitByWord (const SelfType &delimiter, bool trimTokens, bool removeEmptyTokens, AppendToken appendToken) const |
| |
template<class C, class A = std::allocator<C>>
class Arp::Base::Core::BasicString< C, A >
This template class implements the extensions of class String related to std::string, where the character type might be specified accordingly for UTF8 or UTF16 strings, respectively.
- Template Parameters
-
| C | The char type of the string, this should be char for UTF8 strings and char16 for UTF16 strings. wchar_t is not recommended, because it has 2 bytes wide on Windows, but 4 bytes wide on Linux. |
| A | The characters allocator type of the string, which defaults to std::allocator<C>> |