xgboost
Public Types | Public Member Functions | List of all members
xgboost::StringView Struct Reference

#include <string_view.h>

Collaboration diagram for xgboost::StringView:
Collaboration graph

Public Types

using value_type = CharT
 
using iterator = const CharT *
 
using const_iterator = iterator
 
using reverse_iterator = std::reverse_iterator< const_iterator >
 
using const_reverse_iterator = reverse_iterator
 

Public Member Functions

constexpr StringView ()=default
 
constexpr StringView (CharT const *str, std::size_t size)
 
 StringView (std::string const &str)
 
constexpr StringView (CharT const *str)
 
CharT const & operator[] (size_t p) const
 
CharT const & at (size_t p) const
 
constexpr std::size_t size () const
 
constexpr bool empty () const
 
StringView substr (size_t beg, size_t n) const
 
CharT const * c_str () const
 
constexpr CharT const * cbegin () const
 
constexpr CharT const * cend () const
 
constexpr CharT const * begin () const
 
constexpr CharT const * end () const
 
const_reverse_iterator rbegin () const noexcept
 
const_reverse_iterator crbegin () const noexcept
 
const_reverse_iterator rend () const noexcept
 
const_reverse_iterator crend () const noexcept
 

Member Typedef Documentation

◆ const_iterator

◆ const_reverse_iterator

◆ iterator

using xgboost::StringView::iterator = const CharT*

◆ reverse_iterator

using xgboost::StringView::reverse_iterator = std::reverse_iterator<const_iterator>

◆ value_type

Constructor & Destructor Documentation

◆ StringView() [1/4]

constexpr xgboost::StringView::StringView ( )
constexprdefault

◆ StringView() [2/4]

constexpr xgboost::StringView::StringView ( CharT const *  str,
std::size_t  size 
)
inlineconstexpr

◆ StringView() [3/4]

xgboost::StringView::StringView ( std::string const &  str)
inlineexplicit

◆ StringView() [4/4]

constexpr xgboost::StringView::StringView ( CharT const *  str)
inlineconstexpr

Member Function Documentation

◆ at()

CharT const& xgboost::StringView::at ( size_t  p) const
inline

◆ begin()

constexpr CharT const* xgboost::StringView::begin ( ) const
inlineconstexpr

◆ c_str()

CharT const* xgboost::StringView::c_str ( ) const
inline

◆ cbegin()

constexpr CharT const* xgboost::StringView::cbegin ( ) const
inlineconstexpr

◆ cend()

constexpr CharT const* xgboost::StringView::cend ( ) const
inlineconstexpr

◆ crbegin()

const_reverse_iterator xgboost::StringView::crbegin ( ) const
inlinenoexcept

◆ crend()

const_reverse_iterator xgboost::StringView::crend ( ) const
inlinenoexcept

◆ empty()

constexpr bool xgboost::StringView::empty ( ) const
inlineconstexpr

◆ end()

constexpr CharT const* xgboost::StringView::end ( ) const
inlineconstexpr

◆ operator[]()

CharT const& xgboost::StringView::operator[] ( size_t  p) const
inline

◆ rbegin()

const_reverse_iterator xgboost::StringView::rbegin ( ) const
inlinenoexcept

◆ rend()

const_reverse_iterator xgboost::StringView::rend ( ) const
inlinenoexcept

◆ size()

constexpr std::size_t xgboost::StringView::size ( ) const
inlineconstexpr

◆ substr()

StringView xgboost::StringView::substr ( size_t  beg,
size_t  n 
) const
inline

The documentation for this struct was generated from the following file: