![]() |
Home | Libraries | People | FAQ | More |
boost::basic_string_ref
// In header: <boost/utility/string_ref.hpp> template<typename charT, typename traits> class basic_string_ref { public: // types typedef charT value_type; typedef const charT * pointer; typedef const charT & reference; typedef const charT & const_reference; typedef 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; // public member functions basic_string_ref() noexcept; basic_string_ref(const basic_string_ref &); basic_string_ref & operator=(const basic_string_ref &); basic_string_ref(const charT *) noexcept; template<typename Allocator> basic_string_ref(const std::basic_string< charT, traits, Allocator > &); basic_string_ref(const charT *, size_type) noexcept; template<typename Allocator> explicit operator std::basic_string< charT, traits, Allocator >() const; std::basic_string< charT, traits > to_string() const; const_iterator begin() const; const_iterator cbegin() const; const_iterator end() const; const_iterator cend() const; const_reverse_iterator rbegin() const; const_reverse_iterator crbegin() const; const_reverse_iterator rend() const; const_reverse_iterator crend() const; size_type size() const; size_type length() const; size_type max_size() const; bool empty() const; const charT & operator[](size_type) const; const charT & at(size_type) const; const charT & front() const; const charT & back() const; const charT * data() const; void clear(); void remove_prefix(size_type); void remove_suffix(size_type); basic_string_ref substr() const; basic_string_ref substr(size_type, size_type = npos) const; int compare(basic_string_ref) const; bool starts_with(charT) const; bool starts_with(basic_string_ref) const; bool ends_with(charT) const; bool ends_with(basic_string_ref) const; size_type find(basic_string_ref) const; size_type find(charT) const; size_type rfind(basic_string_ref) const; size_type rfind(charT) const; size_type find_first_of(charT) const; size_type find_last_of(charT) const; size_type find_first_of(basic_string_ref) const; size_type find_last_of(basic_string_ref) const; size_type find_first_not_of(basic_string_ref) const; size_type find_first_not_of(charT) const; size_type find_last_not_of(basic_string_ref) const; size_type find_last_not_of(charT) const; // private member functions template<typename Iterator> Iterator find_not_of(Iterator, Iterator, basic_string_ref) const; // public data members static size_type npos; };
basic_string_ref
public member functionsbasic_string_ref() noexcept;
basic_string_ref(const basic_string_ref & rhs);
basic_string_ref & operator=(const basic_string_ref & rhs);
basic_string_ref(const charT * str) noexcept;
template<typename Allocator> basic_string_ref(const std::basic_string< charT, traits, Allocator > & str);
basic_string_ref(const charT * str, size_type len) noexcept;
template<typename Allocator> explicit operator std::basic_string< charT, traits, Allocator >() const;
std::basic_string< charT, traits > to_string() const;
const_iterator begin() const;
const_iterator cbegin() const;
const_iterator end() const;
const_iterator cend() const;
const_reverse_iterator rbegin() const;
const_reverse_iterator crbegin() const;
const_reverse_iterator rend() const;
const_reverse_iterator crend() const;
size_type size() const;
size_type length() const;
size_type max_size() const;
bool empty() const;
const charT & operator[](size_type pos) const;
const charT & at(size_type pos) const;
const charT & front() const;
const charT & back() const;
const charT * data() const;
void clear();
void remove_prefix(size_type n);
void remove_suffix(size_type n);
basic_string_ref substr() const;
basic_string_ref substr(size_type pos, size_type n = npos) const;
int compare(basic_string_ref x) const;
bool starts_with(charT c) const;
bool starts_with(basic_string_ref x) const;
bool ends_with(charT c) const;
bool ends_with(basic_string_ref x) const;
size_type find(basic_string_ref s) const;
size_type find(charT c) const;
size_type rfind(basic_string_ref s) const;
size_type rfind(charT c) const;
size_type find_first_of(charT c) const;
size_type find_last_of(charT c) const;
size_type find_first_of(basic_string_ref s) const;
size_type find_last_of(basic_string_ref s) const;
size_type find_first_not_of(basic_string_ref s) const;
size_type find_first_not_of(charT c) const;
size_type find_last_not_of(basic_string_ref s) const;
size_type find_last_not_of(charT c) const;
basic_string_ref
private member functionstemplate<typename Iterator> Iterator find_not_of(Iterator first, Iterator last, basic_string_ref s) const;