Home | Libraries | People | FAQ | More |
boost::basic_string_view
// In header: <boost/utility/string_view.hpp> template<typename charT, typename traits> class basic_string_view { public: // types typedef traits traits_type; typedef charT value_type; typedef charT * pointer; typedef const charT * const_pointer; typedef charT & reference; typedef const charT & const_reference; typedef const_pointer const_iterator; typedef const_iterator iterator; typedef std::reverse_iterator< const_iterator > const_reverse_iterator; typedef const_reverse_iterator reverse_iterator; typedef std::size_t size_type; typedef std::ptrdiff_t difference_type; // construct/copy/destruct basic_string_view() noexcept; basic_string_view(const basic_string_view &); template<typename Allocator> basic_string_view(const std::basic_string< charT, traits, Allocator > &) noexcept; basic_string_view(const charT *); basic_string_view(const charT *, size_type); basic_string_view & operator=(const basic_string_view &); // public member functions constexpr const_iterator begin() const noexcept; constexpr const_iterator cbegin() const noexcept; constexpr const_iterator end() const noexcept; constexpr const_iterator cend() const noexcept; const_reverse_iterator rbegin() const noexcept; const_reverse_iterator crbegin() const noexcept; const_reverse_iterator rend() const noexcept; const_reverse_iterator crend() const noexcept; constexpr size_type size() const noexcept; constexpr size_type length() const noexcept; constexpr size_type max_size() const noexcept; constexpr bool empty() const noexcept; constexpr const_reference operator[](size_type) const noexcept; constexpr const_reference at(size_t) const; constexpr const_reference front() const; constexpr const_reference back() const; constexpr const_pointer data() const noexcept; void clear() noexcept; constexpr void remove_prefix(size_type); constexpr void remove_suffix(size_type); constexpr void swap(basic_string_view &) noexcept; template<typename Allocator> explicit operator std::basic_string< charT, traits, Allocator >() const; template<typename Allocator = std::allocator<charT> > std::basic_string< charT, traits, Allocator > to_string(const Allocator & = Allocator()) const; size_type copy(charT *, size_type, size_type = 0) const; constexpr basic_string_view substr(size_type, size_type = npos) const; constexpr int compare(basic_string_view) const noexcept; constexpr int compare(size_type, size_type, basic_string_view) const noexcept; constexpr int compare(size_type, size_type, basic_string_view, size_type, size_type) const; constexpr int compare(const charT *) const; constexpr int compare(size_type, size_type, const charT *) const; constexpr int compare(size_type, size_type, const charT *, size_type) const; constexpr bool starts_with(charT) const noexcept; constexpr bool starts_with(basic_string_view) const noexcept; constexpr bool ends_with(charT) const noexcept; constexpr bool ends_with(basic_string_view) const noexcept; constexpr size_type find(basic_string_view, size_type = 0) const noexcept; constexpr size_type find(charT, size_type = 0) const noexcept; constexpr size_type find(const charT *, size_type, size_type) const noexcept; constexpr size_type find(const charT *, size_type = 0) const noexcept; constexpr size_type rfind(basic_string_view, size_type = npos) const noexcept; constexpr size_type rfind(charT, size_type = npos) const noexcept; constexpr size_type rfind(const charT *, size_type, size_type) const noexcept; constexpr size_type rfind(const charT *, size_type = npos) const noexcept; constexpr size_type find_first_of(basic_string_view, size_type = 0) const noexcept; constexpr size_type find_first_of(charT, size_type = 0) const noexcept; constexpr size_type find_first_of(const charT *, size_type, size_type) const noexcept; constexpr size_type find_first_of(const charT *, size_type = 0) const noexcept; constexpr size_type find_last_of(basic_string_view, size_type = npos) const noexcept; constexpr size_type find_last_of(charT, size_type = npos) const noexcept; constexpr size_type find_last_of(const charT *, size_type, size_type) const noexcept; constexpr size_type find_last_of(const charT *, size_type = npos) const noexcept; constexpr size_type find_first_not_of(basic_string_view, size_type = 0) const noexcept; constexpr size_type find_first_not_of(charT, size_type = 0) const noexcept; constexpr size_type find_first_not_of(const charT *, size_type, size_type) const noexcept; constexpr size_type find_first_not_of(const charT *, size_type = 0) const noexcept; constexpr size_type find_last_not_of(basic_string_view, size_type = npos) const noexcept; constexpr size_type find_last_not_of(charT, size_type = npos) const noexcept; constexpr size_type find_last_not_of(const charT *, size_type, size_type) const noexcept; constexpr size_type find_last_not_of(const charT *, size_type = npos) const noexcept; // private member functions template<typename r_iter> size_type reverse_distance(r_iter, r_iter) const noexcept; template<typename Iterator> Iterator find_not_of(Iterator, Iterator, basic_string_view) const noexcept; // public data members static constexpr size_type npos; };
basic_string_view
public
construct/copy/destructbasic_string_view() noexcept;
basic_string_view(const basic_string_view & rhs);
template<typename Allocator> basic_string_view(const std::basic_string< charT, traits, Allocator > & str) noexcept;
basic_string_view(const charT * str);
basic_string_view(const charT * str, size_type len);
basic_string_view & operator=(const basic_string_view & rhs);
basic_string_view
public member functionsconstexpr const_iterator begin() const noexcept;
constexpr const_iterator cbegin() const noexcept;
constexpr const_iterator end() const noexcept;
constexpr const_iterator cend() const noexcept;
const_reverse_iterator rbegin() const noexcept;
const_reverse_iterator crbegin() const noexcept;
const_reverse_iterator rend() const noexcept;
const_reverse_iterator crend() const noexcept;
constexpr size_type size() const noexcept;
constexpr size_type length() const noexcept;
constexpr size_type max_size() const noexcept;
constexpr bool empty() const noexcept;
constexpr const_reference operator[](size_type pos) const noexcept;
constexpr const_reference at(size_t pos) const;
constexpr const_reference front() const;
constexpr const_reference back() const;
constexpr const_pointer data() const noexcept;
void clear() noexcept;
constexpr void remove_prefix(size_type n);
constexpr void remove_suffix(size_type n);
constexpr void swap(basic_string_view & s) noexcept;
template<typename Allocator> explicit operator std::basic_string< charT, traits, Allocator >() const;
template<typename Allocator = std::allocator<charT> > std::basic_string< charT, traits, Allocator > to_string(const Allocator & a = Allocator()) const;
size_type copy(charT * s, size_type n, size_type pos = 0) const;
constexpr basic_string_view substr(size_type pos, size_type n = npos) const;
constexpr int compare(basic_string_view x) const noexcept;
constexpr int compare(size_type pos1, size_type n1, basic_string_view x) const noexcept;
constexpr int compare(size_type pos1, size_type n1, basic_string_view x, size_type pos2, size_type n2) const;
constexpr int compare(const charT * x) const;
constexpr int compare(size_type pos1, size_type n1, const charT * x) const;
constexpr int compare(size_type pos1, size_type n1, const charT * x, size_type n2) const;
constexpr bool starts_with(charT c) const noexcept;
constexpr bool starts_with(basic_string_view x) const noexcept;
constexpr bool ends_with(charT c) const noexcept;
constexpr bool ends_with(basic_string_view x) const noexcept;
constexpr size_type find(basic_string_view s, size_type pos = 0) const noexcept;
constexpr size_type find(charT c, size_type pos = 0) const noexcept;
constexpr size_type find(const charT * s, size_type pos, size_type n) const noexcept;
constexpr size_type find(const charT * s, size_type pos = 0) const noexcept;
constexpr size_type rfind(basic_string_view s, size_type pos = npos) const noexcept;
constexpr size_type rfind(charT c, size_type pos = npos) const noexcept;
constexpr size_type rfind(const charT * s, size_type pos, size_type n) const noexcept;
constexpr size_type rfind(const charT * s, size_type pos = npos) const noexcept;
constexpr size_type find_first_of(basic_string_view s, size_type pos = 0) const noexcept;
constexpr size_type find_first_of(charT c, size_type pos = 0) const noexcept;
constexpr size_type find_first_of(const charT * s, size_type pos, size_type n) const noexcept;
constexpr size_type find_first_of(const charT * s, size_type pos = 0) const noexcept;
constexpr size_type find_last_of(basic_string_view s, size_type pos = npos) const noexcept;
constexpr size_type find_last_of(charT c, size_type pos = npos) const noexcept;
constexpr size_type find_last_of(const charT * s, size_type pos, size_type n) const noexcept;
constexpr size_type find_last_of(const charT * s, size_type pos = npos) const noexcept;
constexpr size_type find_first_not_of(basic_string_view s, size_type pos = 0) const noexcept;
constexpr size_type find_first_not_of(charT c, size_type pos = 0) const noexcept;
constexpr size_type find_first_not_of(const charT * s, size_type pos, size_type n) const noexcept;
constexpr size_type find_first_not_of(const charT * s, size_type pos = 0) const noexcept;
constexpr size_type find_last_not_of(basic_string_view s, size_type pos = npos) const noexcept;
constexpr size_type find_last_not_of(charT c, size_type pos = npos) const noexcept;
constexpr size_type find_last_not_of(const charT * s, size_type pos, size_type n) const noexcept;
constexpr size_type find_last_not_of(const charT * s, size_type pos = npos) const noexcept;
basic_string_view
private member functionstemplate<typename r_iter> size_type reverse_distance(r_iter first, r_iter last) const noexcept;
template<typename Iterator> Iterator find_not_of(Iterator first, Iterator last, basic_string_view s) const noexcept;