Template Class basic_string_view
Defined in File string_view.hpp
Class Documentation
-
template<typename CharT, typename Traits = std::char_traits<CharT>>
class basic_string_view Public Types
-
using const_reverse_iterator = std::reverse_iterator<const_iterator>
-
using size_type = size_t
-
using difference_type = std::ptrdiff_t
Public Functions
-
basic_string_view() = default
The default constructor;.
-
inline basic_string_view(const CharT *p, size_type len) noexcept
Construct from CharT pointer and provided length.
-
template<typename Allocator>
inline basic_string_view(const std::basic_string<CharT, Traits, Allocator> &str) noexcept Construct from std::string.
-
basic_string_view(const basic_string_view&) = default
Copy constructor.
-
basic_string_view &operator=(const basic_string_view&) = default
Assignment operator.
-
inline ~basic_string_view()
Destructor.
-
inline const_iterator cbegin() const noexcept
-
inline const_iterator cend() const noexcept
-
inline const_iterator crbegin() const noexcept
-
inline const_iterator crend() const noexcept
-
inline bool empty() const noexcept
-
inline const_reference operator[](size_type idx) const noexcept
Element Access Member Functions.
-
inline const_reference front() const noexcept
-
inline const_reference back() const noexcept
-
inline const_pointer data() const noexcept
-
inline void swap(basic_string_view &other)
-
template<typename Allocator>
inline explicit operator std::basic_string<CharT, Traits, Allocator>() const String Operation Member Functions.
-
inline basic_string_view substr(size_type pos, size_type n = npos) const noexcept
-
inline int compare(const basic_string_view &other) const noexcept
Comparison Member Functions.
-
inline int compare(size_type pos, size_type n, basic_string_view other) const noexcept
-
inline size_type find(basic_string_view sv, size_type pos = 0) const noexcept
-
inline size_type rfind(basic_string_view sv, size_type pos = 0) const noexcept
-
inline size_type find_first_of(basic_string_view str, size_type pos = 0) const noexcept
-
inline size_type find_last_of(basic_string_view str, size_type pos = npos) const noexcept
-
inline size_type find_first_not_of(basic_string_view str, size_type pos = 0) const noexcept
-
inline size_type find_last_not_of(basic_string_view str, size_type pos = npos) const noexcept
-
using const_reverse_iterator = std::reverse_iterator<const_iterator>