Constant string view container template. Keeps pointer to string and its length.
More...
|
| | BasicStringView ()=default |
| | BasicStringView (const BasicStringView &)=default |
| | BasicStringView (BasicStringView &&)=default |
| BasicStringView & | operator= (const BasicStringView &)=default |
| BasicStringView & | operator= (BasicStringView &&)=default |
| | BasicStringView (const_pointer str) |
| | Initializes the string view with the specified null-terminated string.
|
| | BasicStringView (const_pointer str, size_type len) |
| | Initializes the string view with a pointer to the data and size.
|
| template<template< class, class, class > class TString, class Allocator> |
| | BasicStringView (const TString< TChar, Traits, Allocator > &str) |
| | Initializes the string view with another templated string class. This would usually be std::basic_string.
|
| bool | empty () const noexcept |
| | Returns true if this string view 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 view.
|
| 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.
|
| BasicStringView | substr (size_type pos=0, size_type count=npos) const |
| | Returns a sub-view of this string view.
|
| int | compare (const BasicStringView &str) const |
| | Compares this string with the specified string in a strict-weak-order (SWO).
|
| int | compare (size_type pos1, size_type count1, const BasicStringView &str) const |
| | Compares a sub-view of this string with the specified string.
|
| int | compare (size_type pos1, size_type count1, const BasicStringView &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=BasicStringView::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=BasicStringView::npos) const noexcept |
| size_type | find_last_not_of (const TChar *sequence, size_type pos, size_type count) const noexcept |
| const_reference | operator[] (size_type pos) const |
template<typename TChar, typename Traits = std::char_traits<TChar>>
class LLGL::BasicStringView< TChar, Traits >
Constant string view container template. Keeps pointer to string and its length.
- Template Parameters
-
| TChar | Specifies the string character type. |
| Traits | Specifies the character traits. By default std::char_traits<TChar>. |
template<typename TChar, typename Traits = std::char_traits<TChar>>
template<template< class, class, class > class TString, class Allocator>
| LLGL::BasicStringView< TChar, Traits >::BasicStringView |
( |
const TString< TChar, Traits, Allocator > & | str | ) |
|
|
inline |
Initializes the string view with another templated string class. This would usually be std::basic_string.