Constant string container template to either reference a compile-time string literal (lightweight) or own a dynamic string (non-mutable).
More...
|
| | BasicStringLiteral () |
| | Initializes an empty string literal.
|
| | BasicStringLiteral (const BasicStringLiteral &rhs) |
| | Initializes the string with a copy of the input string.
|
| | BasicStringLiteral (BasicStringLiteral &&rhs) noexcept |
| | Moves ownership from the input string literal to the newly constructed string literal.
|
| BasicStringLiteral & | operator= (const BasicStringLiteral &rhs) |
| BasicStringLiteral & | operator= (BasicStringLiteral &&rhs) |
| | BasicStringLiteral (const_pointer str) |
| | Initializes the string literal as a reference (non-managed).
|
| | BasicStringLiteral (const_pointer str, CopyTag) |
| | Initializes the string literal as a managed copy of the input string.
|
| | BasicStringLiteral (const BasicStringView< TChar, Traits > &str) |
| | Initializes the string literal with the specified null-terminated string.
|
| template<template< class, class, class > class TString> |
| | BasicStringLiteral (const TString< TChar, Traits, Allocator > &str) |
| | Initializes the string literal with another templated string class. This would usually be std::basic_string.
|
| | ~BasicStringLiteral () |
| | Destructs the string literal. If this is a managed string, it will delete its internal memory.
|
| bool | empty () const noexcept |
| | Returns true if this string literal is empty, i.e. size() and length() return 0.
|
| size_type | size () const noexcept |
| | Returns the length of this string. This is equivalent to length().
|
| size_type | length () const noexcept |
| | Returns the length of this string. This is equivalent to size().
|
| const_pointer | data () const noexcept |
| | Returns the raw pointer of this string literal.
|
| const_pointer | c_str () const noexcept |
| | Returns the raw pointer of this string literal.
|
| const_reference | at (size_type pos) const |
| | Returns a constant reference to the character at the specified zero-based position.
|
| const_reference | front () const |
| | Returns a constant reference to the first character of this string.
|
| const_reference | back () const |
| | Returns a constant reference to the last character of this string.
|
| const_iterator | begin () const noexcept |
| const_iterator | cbegin () const noexcept |
| | Returns constant iterator to the beginning of this string.
|
| const_reverse_iterator | rbegin () const |
| const_reverse_iterator | crbegin () const |
| | Returns constant reverse iterator to the end of this string.
|
| const_iterator | end () const noexcept |
| const_iterator | cend () const noexcept |
| | Returns constant iterator to the end of this string.
|
| const_reverse_iterator | rend () const |
| const_reverse_iterator | crend () const |
| | Returns constant reverse iterator to the beginning of this string.
|
| int | compare (const BasicStringLiteral &str) const |
| | Compares this string with the specified string in a strict-weak-order (SWO).
|
| int | compare (size_type pos1, size_type count1, const BasicStringLiteral &str) const |
| | Compares a sub-view of this string with the specified string.
|
| int | compare (size_type pos1, size_type count1, const BasicStringLiteral &str, size_type pos2, size_type count2=npos) const |
| | Compares a sub-view of this string with a sub-view of the specified string.
|
| size_type | find (TChar chr, size_type pos=0) const noexcept |
| size_type | find_first_of (const TChar *sequence, size_type pos=0) const noexcept |
| size_type | find_first_of (const TChar *sequence, size_type pos, size_type count) const noexcept |
| size_type | find_first_not_of (const TChar *sequence, size_type pos=0) const noexcept |
| size_type | find_first_not_of (const TChar *sequence, size_type pos, size_type count) const noexcept |
| size_type | find_last_of (const TChar *sequence, size_type pos=BasicStringLiteral::npos) const noexcept |
| size_type | find_last_of (const TChar *sequence, size_type pos, size_type count) const noexcept |
| size_type | find_last_not_of (const TChar *sequence, size_type pos=BasicStringLiteral::npos) const noexcept |
| size_type | find_last_not_of (const TChar *sequence, size_type pos, size_type count) const noexcept |
| void | clear () |
| | Clears this string literal by making it a reference to the empty string.
|
| const_reference | operator[] (size_type pos) const |
| | operator BasicStringView< TChar, Traits > () const |
| | Implicitly converts this string literal as string view.
|
template<typename TChar, typename Traits = std::char_traits<TChar>, typename Allocator = std::allocator<TChar>>
class LLGL::BasicStringLiteral< TChar, Traits, Allocator >
Constant string container template to either reference a compile-time string literal (lightweight) or own a dynamic string (non-mutable).
- Template Parameters
-
| TChar | Specifies the string character type. |
| Traits | Specifies the character traits. By default std::char_traits<TChar>. |