#include <stlsoft/string/string_view.hpp>

| C | The character type | |
| T | The traits type. On translators that support default template arguments this is defaulted to char_traits<C> | |
| A | The allocator type. On translators that support default template arguments this is defaulted to allocator_selector<C>::allocator_type. This is only used by the proxy generated by c_str() |
Attributes | |
| size_type | size () const throw () |
| The number of elements in the string. | |
| size_type | length () const throw () |
| The number of elements in the string. | |
| size_type | capacity () const throw () |
| The storage currently allocated by the string. | |
| bool | empty () const throw () |
| Indicates whether the string is empty. | |
| allocator_type | get_allocator () const |
| Returns an instance of the allocator type. | |
| static size_type | max_size () throw () |
| The maximum number of elements that can be stored in the string. | |
Public Types | |
| typedef C | value_type |
| The value type. | |
| typedef T | traits_type |
| The traits type. | |
| typedef A | allocator_type |
| The allocator type. | |
| typedef basic_string_view< C, T, A > | class_type |
| The current parameterisation of the type. | |
| typedef value_type | char_type |
| The character type. | |
| typedef value_type const * | const_pointer |
| The non-mutable (const) pointer type. | |
| typedef value_type const & | const_reference |
| The non-mutable (const) reference type. | |
| typedef size_t | size_type |
| The size type. | |
| typedef ss_ptrdiff_t | difference_type |
| The difference type. | |
| typedef pointer_iterator < value_type const , const_pointer, const_reference >::type | const_iterator |
| The non-mutating (const) iterator type. | |
Public Member Functions | |
Construction | |
| basic_string_view () | |
| Default constructor. | |
| basic_string_view (class_type const &rhs) | |
| Copy constructor. | |
| basic_string_view (class_type const &s, size_type pos) | |
| Construct from the given string at the specified position. | |
| basic_string_view (class_type const &s, size_type pos, size_type cch) | |
Construct with cch characters from the given string at the specified position. | |
| basic_string_view (char_type const *s) | |
| Construct from a null-terminated character string. | |
| basic_string_view (char_type const *s, size_type cch) | |
Construct with cch characters from the given character string. | |
| basic_string_view (char_type const *first, char_type const *last) | |
| Construct from the range [first:last). | |
| ~basic_string_view () throw () | |
| Destructor. | |
| class_type & | operator= (class_type const &rhs) |
| Copy assignment operator. | |
Operations | |
| void | swap (class_type &other) throw () |
Swaps the contents between this and other. | |
| void | clear () throw () |
| Empties the string. | |
| void | refresh () throw () |
| Clear c_str() representation. | |
Comparison | |
| bool | equal (class_type const &rhs) const throw () |
| Evaluates whether two strings are equal. | |
| bool | equal (value_type const *rhs, size_type cchRhs) const throw () |
| Evaluates whether two strings are equal. | |
| ss_sint_t | compare (size_type pos, size_type cch, value_type const *s, size_type cchRhs) const throw () |
Compares this with the given string. | |
| ss_sint_t | compare (size_type pos, size_type cch, value_type const *s) const throw () |
Compares this with the given string. | |
| ss_sint_t | compare (value_type const *s) const throw () |
Compares this with the given string. | |
| ss_sint_t | compare (size_type pos, size_type cch, class_type const &rhs, size_type posRhs, size_type cchRhs) const throw () |
Compares this with the given string. | |
| ss_sint_t | compare (size_type pos, size_type cch, class_type const &rhs) const throw () |
Compares this with the given string. | |
| ss_sint_t | compare (class_type const &rhs) const throw () |
Compares this with the given string. | |
Accessors | |
| const_reference | operator[] (size_type index) const |
| Returns non-mutable (const) reference at the given index. | |
| const_reference | at (size_type index) const |
| Returns non-mutable (const) reference at the given index. | |
| value_type const * | c_str () const |
| Returns null-terminated non-mutable (const) pointer to string data. | |
| value_type const * | data () const throw () |
| Returns non-mutable (const) pointer to string data. | |
| value_type const * | base () const throw () |
| Returns value of base pointer. | |
| const_reference | front () const |
| Returns the first character in the string. | |
| const_reference | back () const |
| Returns the last character in the string. | |
| size_type | copy (value_type *dest, size_type cch, size_type pos=0) const |
| Copies elements into the given destination. | |
Iteration | |
| const_iterator | begin () const |
| Begins the iteration. | |
| const_iterator | end () const |
| Ends the iteration. | |
| typedef C value_type |
The value type.
| typedef T traits_type |
The traits type.
| typedef A allocator_type |
The allocator type.
| typedef basic_string_view<C, T, A> class_type |
The current parameterisation of the type.
| typedef value_type char_type |
The character type.
| typedef value_type const* const_pointer |
The non-mutable (const) pointer type.
| typedef value_type const& const_reference |
The non-mutable (const) reference type.
| typedef ss_ptrdiff_t difference_type |
The difference type.
| typedef pointer_iterator< value_type const , const_pointer , const_reference >::type const_iterator |
The non-mutating (const) iterator type.
Default constructor.
| basic_string_view | ( | class_type const & | rhs | ) |
Copy constructor.
| basic_string_view | ( | class_type const & | s, | |
| size_type | pos | |||
| ) |
Construct from the given string at the specified position.
| basic_string_view | ( | class_type const & | s, | |
| size_type | pos, | |||
| size_type | cch | |||
| ) |
Construct with cch characters from the given string at the specified position.
| basic_string_view | ( | char_type const * | s | ) |
Construct from a null-terminated character string.
| basic_string_view | ( | char_type const * | s, | |
| size_type | cch | |||
| ) |
Construct with cch characters from the given character string.
| basic_string_view | ( | char_type const * | first, | |
| char_type const * | last | |||
| ) |
Construct from the range [first:last).
| ~basic_string_view | ( | ) | throw () |
Destructor.
| class_type& operator= | ( | class_type const & | rhs | ) |
Copy assignment operator.
| void swap | ( | class_type & | other | ) | throw () |
Swaps the contents between this and other.
| void clear | ( | ) | throw () |
Empties the string.
| void refresh | ( | ) | throw () |
| size_type size | ( | ) | const throw () |
The number of elements in the string.
| static size_type max_size | ( | ) | throw () [static] |
The maximum number of elements that can be stored in the string.
| size_type length | ( | ) | const throw () |
The number of elements in the string.
| size_type capacity | ( | ) | const throw () |
The storage currently allocated by the string.
| bool empty | ( | ) | const throw () |
Indicates whether the string is empty.
| allocator_type get_allocator | ( | ) | const |
Returns an instance of the allocator type.
| bool equal | ( | class_type const & | rhs | ) | const throw () |
Evaluates whether two strings are equal.
| bool equal | ( | value_type const * | rhs, | |
| size_type | cchRhs | |||
| ) | const throw () |
Evaluates whether two strings are equal.
| ss_sint_t compare | ( | size_type | pos, | |
| size_type | cch, | |||
| value_type const * | s, | |||
| size_type | cchRhs | |||
| ) | const throw () |
Compares this with the given string.
| ss_sint_t compare | ( | size_type | pos, | |
| size_type | cch, | |||
| value_type const * | s | |||
| ) | const throw () |
Compares this with the given string.
| ss_sint_t compare | ( | value_type const * | s | ) | const throw () |
Compares this with the given string.
| ss_sint_t compare | ( | size_type | pos, | |
| size_type | cch, | |||
| class_type const & | rhs, | |||
| size_type | posRhs, | |||
| size_type | cchRhs | |||
| ) | const throw () |
Compares this with the given string.
| ss_sint_t compare | ( | size_type | pos, | |
| size_type | cch, | |||
| class_type const & | rhs | |||
| ) | const throw () |
Compares this with the given string.
| ss_sint_t compare | ( | class_type const & | rhs | ) | const throw () |
Compares this with the given string.
| const_reference operator[] | ( | size_type | index | ) | const |
Returns non-mutable (const) reference at the given index.
| const_reference at | ( | size_type | index | ) | const |
Returns non-mutable (const) reference at the given index.
| value_type const* c_str | ( | ) | const |
Returns null-terminated non-mutable (const) pointer to string data.
If the view's parameterisation is with a no-throw allocator, behaviour is undefined in con
| value_type const* data | ( | ) | const throw () |
Returns non-mutable (const) pointer to string data.
| value_type const* base | ( | ) | const throw () |
Returns value of base pointer.
| const_reference front | ( | ) | const |
Returns the first character in the string.
| const_reference back | ( | ) | const |
Returns the last character in the string.
| size_type copy | ( | value_type * | dest, | |
| size_type | cch, | |||
| size_type | pos = 0 | |||
| ) | const |
Copies elements into the given destination.
| const_iterator begin | ( | ) | const |
Begins the iteration.
| const_iterator end | ( | ) | const |
Ends the iteration.
1.5.6