ゴミ箱
Public Types | Public Member Functions | Static Public Attributes | Friends | List of all members
boost::beast::static_string< N, CharT, Traits > Class Template Reference

#include <static_string.hpp>

Public Types

using traits_type = Traits
 
using value_type = typename Traits::char_type
 
using size_type = std::size_t
 
using difference_type = std::ptrdiff_t
 
using pointer = value_type *
 
using reference = value_type &
 
using const_pointer = value_type const *
 
using const_reference = value_type const &
 
using iterator = value_type *
 
using const_iterator = value_type const *
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using string_view_type = basic_string_view< CharT, Traits >
 The type of string_view returned by the interface. More...
 

Public Member Functions

 static_string ()
 Default constructor (empty string). More...
 
 static_string (size_type count, CharT ch)
 
template<std::size_t M>
 static_string (static_string< M, CharT, Traits > const &other, size_type pos)
 Construct with a substring (pos, other.size()) of other. More...
 
template<std::size_t M>
 static_string (static_string< M, CharT, Traits > const &other, size_type pos, size_type count)
 Construct with a substring (pos, count) of other. More...
 
 static_string (CharT const *s, size_type count)
 Construct with the first count characters of s, including nulls. More...
 
 static_string (CharT const *s)
 Construct from a null terminated string. More...
 
template<class InputIt >
 static_string (InputIt first, InputIt last)
 Construct from a range of characters. More...
 
 static_string (static_string const &other)
 Copy constructor. More...
 
template<std::size_t M>
 static_string (static_string< M, CharT, Traits > const &other)
 Copy constructor. More...
 
 static_string (std::initializer_list< CharT > init)
 Construct from an initializer list. More...
 
 static_string (string_view_type sv)
 Construct from a string_view More...
 
template<class T , class = typename std::enable_if< std::is_convertible<T, string_view_type>::value>::type>
 static_string (T const &t, size_type pos, size_type n)
 
static_stringoperator= (static_string const &str)
 Copy assignment. More...
 
template<std::size_t M>
static_stringoperator= (static_string< M, CharT, Traits > const &str)
 Copy assignment. More...
 
static_stringoperator= (CharT const *s)
 Assign from null-terminated string. More...
 
static_stringoperator= (CharT ch)
 Assign from single character. More...
 
static_stringoperator= (std::initializer_list< CharT > init)
 Assign from initializer list. More...
 
static_stringoperator= (string_view_type sv)
 Assign from string_view_type. More...
 
static_stringassign (size_type count, CharT ch)
 Assign count copies of ch. More...
 
static_stringassign (static_string const &str)
 Assign from another static_string More...
 
template<std::size_t M>
static_stringassign (static_string< M, CharT, Traits > const &str)
 Assign from another static_string More...
 
template<std::size_t M>
static_stringassign (static_string< M, CharT, Traits > const &str, size_type pos, size_type count=npos)
 Assign count characterss starting at npos from other. More...
 
static_stringassign (CharT const *s, size_type count)
 Assign the first count characters of s, including nulls. More...
 
static_stringassign (CharT const *s)
 Assign a null terminated string. More...
 
template<class InputIt >
static_stringassign (InputIt first, InputIt last)
 Assign from an iterator range of characters. More...
 
static_stringassign (std::initializer_list< CharT > init)
 Assign from initializer list. More...
 
static_stringassign (string_view_type str)
 Assign from string_view_type. More...
 
template<class T >
std::enable_if< std::is_convertible< T, string_view_type >::value, static_string & >::type assign (T const &t, size_type pos, size_type count=npos)
 
reference at (size_type pos)
 Access specified character with bounds checking. More...
 
const_reference at (size_type pos) const
 Access specified character with bounds checking. More...
 
reference operator[] (size_type pos)
 Access specified character. More...
 
const_reference operator[] (size_type pos) const
 Access specified character. More...
 
CharT & front ()
 Accesses the first character. More...
 
CharT const & front () const
 Accesses the first character. More...
 
CharT & back ()
 Accesses the last character. More...
 
CharT const & back () const
 Accesses the last character. More...
 
CharT * data ()
 Returns a pointer to the first character of a string. More...
 
CharT const * data () const
 Returns a pointer to the first character of a string. More...
 
CharT const * c_str () const
 Returns a non-modifiable standard C character array version of the string. More...
 
 operator string_view_type () const
 Convert a static string to a string_view_type More...
 
iterator begin ()
 Returns an iterator to the beginning. More...
 
const_iterator begin () const
 Returns an iterator to the beginning. More...
 
const_iterator cbegin () const
 Returns an iterator to the beginning. More...
 
iterator end ()
 Returns an iterator to the end. More...
 
const_iterator end () const
 Returns an iterator to the end. More...
 
const_iterator cend () const
 Returns an iterator to the end. More...
 
reverse_iterator rbegin ()
 Returns a reverse iterator to the beginning. More...
 
const_reverse_iterator rbegin () const
 Returns a reverse iterator to the beginning. More...
 
const_reverse_iterator crbegin () const
 Returns a reverse iterator to the beginning. More...
 
reverse_iterator rend ()
 Returns a reverse iterator to the end. More...
 
const_reverse_iterator rend () const
 Returns a reverse iterator to the end. More...
 
const_reverse_iterator crend () const
 Returns a reverse iterator to the end. More...
 
bool empty () const
 Returns true if the string is empty. More...
 
size_type size () const
 Returns the number of characters, excluding the null terminator. More...
 
size_type length () const
 Returns the number of characters, excluding the null terminator. More...
 
size_type constexpr max_size () const
 Returns the maximum number of characters that can be stored, excluding the null terminator. More...
 
void reserve (std::size_t n)
 
size_type constexpr capacity () const
 Returns the number of characters that can be held in currently allocated storage. More...
 
void shrink_to_fit ()
 
void clear ()
 Clears the contents. More...
 
static_stringinsert (size_type index, size_type count, CharT ch)
 
static_stringinsert (size_type index, CharT const *s)
 
static_stringinsert (size_type index, CharT const *s, size_type count)
 
template<std::size_t M>
static_stringinsert (size_type index, static_string< M, CharT, Traits > const &str)
 
template<std::size_t M>
static_stringinsert (size_type index, static_string< M, CharT, Traits > const &str, size_type index_str, size_type count=npos)
 
iterator insert (const_iterator pos, CharT ch)
 
iterator insert (const_iterator pos, size_type count, CharT ch)
 
template<class InputIt >
std::enable_if< detail::is_input_iterator< InputIt >::value, iterator >::type insert (const_iterator pos, InputIt first, InputIt last)
 
iterator insert (const_iterator pos, std::initializer_list< CharT > init)
 
static_stringinsert (size_type index, string_view_type str)
 
template<class T >
std::enable_if< std::is_convertible< T const &, string_view_type >::value &&!std::is_convertible< T const &, CharT const * >::value, static_string & >::type insert (size_type index, T const &t, size_type index_str, size_type count=npos)
 
static_stringerase (size_type index=0, size_type count=npos)
 
iterator erase (const_iterator pos)
 
iterator erase (const_iterator first, const_iterator last)
 
void push_back (CharT ch)
 
void pop_back ()
 
static_stringappend (size_type count, CharT ch)
 
template<std::size_t M>
static_stringappend (static_string< M, CharT, Traits > const &str)
 
template<std::size_t M>
static_stringappend (static_string< M, CharT, Traits > const &str, size_type pos, size_type count=npos)
 
static_stringappend (CharT const *s, size_type count)
 
static_stringappend (CharT const *s)
 
template<class InputIt >
std::enable_if< detail::is_input_iterator< InputIt >::value, static_string & >::type append (InputIt first, InputIt last)
 
static_stringappend (std::initializer_list< CharT > init)
 
static_stringappend (string_view_type sv)
 
template<class T >
std::enable_if< std::is_convertible< T const &, string_view_type >::value &&!std::is_convertible< T const &, CharT const * >::value, static_string & >::type append (T const &t, size_type pos, size_type count=npos)
 
template<std::size_t M>
static_stringoperator+= (static_string< M, CharT, Traits > const &str)
 
static_stringoperator+= (CharT ch)
 
static_stringoperator+= (CharT const *s)
 
static_stringoperator+= (std::initializer_list< CharT > init)
 
static_stringoperator+= (string_view_type const &str)
 
template<std::size_t M>
int compare (static_string< M, CharT, Traits > const &str) const
 
template<std::size_t M>
int compare (size_type pos1, size_type count1, static_string< M, CharT, Traits > const &str) const
 
template<std::size_t M>
int compare (size_type pos1, size_type count1, static_string< M, CharT, Traits > const &str, size_type pos2, size_type count2=npos) const
 
int compare (CharT const *s) const
 
int compare (size_type pos1, size_type count1, CharT const *s) const
 
int compare (size_type pos1, size_type count1, CharT const *s, size_type count2) const
 
int compare (string_view_type str) const
 
int compare (size_type pos1, size_type count1, string_view_type str) const
 
template<class T >
std::enable_if< std::is_convertible< T const &, string_view_type >::value &&!std::is_convertible< T const &, CharT const * >::value, int >::type compare (size_type pos1, size_type count1, T const &t, size_type pos2, size_type count2=npos) const
 
string_view_type substr (size_type pos=0, size_type count=npos) const
 
size_type copy (CharT *dest, size_type count, size_type pos=0) const
 Copy a substring (pos, pos+count) to character string pointed to by dest. More...
 
void resize (std::size_t n)
 
void resize (std::size_t n, CharT c)
 
void swap (static_string &str)
 Exchange the contents of this string with another. More...
 
template<std::size_t M>
void swap (static_string< M, CharT, Traits > &str)
 Exchange the contents of this string with another. More...
 
template<std::size_t M>
auto assign (static_string< M, CharT, Traits > const &str, size_type pos, size_type count) -> static_string &
 
template<class InputIt>
auto assign (InputIt first, InputIt last) -> static_string &
 
template<class T>
auto assign (T const &t, size_type pos, size_type count) -> typename std::enable_if< std::is_convertible< T, string_view_type >::value, static_string & >::type
 
template<std::size_t M>
auto insert (size_type index, static_string< M, CharT, Traits > const &str, size_type index_str, size_type count) -> static_string &
 
template<class InputIt>
auto insert (const_iterator pos, InputIt first, InputIt last) -> typename std::enable_if< detail::is_input_iterator< InputIt >::value, iterator >::type
 
template<class T>
auto insert (size_type index, const T &t, size_type index_str, size_type count) -> typename std::enable_if< std::is_convertible< T const &, string_view_type >::value && !std::is_convertible< T const &, CharT const * >::value, static_string & >::type
 
template<std::size_t M>
auto append (static_string< M, CharT, Traits > const &str, size_type pos, size_type count) -> static_string &
 

Static Public Attributes

static std::size_t constexpr max_size_n = N
 Maximum size of the string excluding the null terminator. More...
 
static constexpr size_type npos = size_type(-1)
 A special index. More...
 

Friends

template<std::size_t , class , class >
class static_string
 

Detailed Description

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
class boost::beast::static_string< N, CharT, Traits >

A modifiable string with a fixed-size storage area.

These objects behave like std::string except that the storage is not dynamically allocated but rather fixed in size.

These strings offer performance advantages when a protocol imposes a natural small upper limit on the size of a value.

Note
The stored string is always null-terminated.
See also
to_static_string

Member Typedef Documentation

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
using boost::beast::static_string< N, CharT, Traits >::const_iterator = value_type const*
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
using boost::beast::static_string< N, CharT, Traits >::const_pointer = value_type const*
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
using boost::beast::static_string< N, CharT, Traits >::const_reference = value_type const&
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
using boost::beast::static_string< N, CharT, Traits >::const_reverse_iterator = std::reverse_iterator<const_iterator>
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
using boost::beast::static_string< N, CharT, Traits >::difference_type = std::ptrdiff_t
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
using boost::beast::static_string< N, CharT, Traits >::iterator = value_type*
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
using boost::beast::static_string< N, CharT, Traits >::pointer = value_type*
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
using boost::beast::static_string< N, CharT, Traits >::reference = value_type&
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
using boost::beast::static_string< N, CharT, Traits >::reverse_iterator = std::reverse_iterator<iterator>
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
using boost::beast::static_string< N, CharT, Traits >::size_type = std::size_t
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
using boost::beast::static_string< N, CharT, Traits >::string_view_type = basic_string_view<CharT, Traits>

The type of string_view returned by the interface.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
using boost::beast::static_string< N, CharT, Traits >::traits_type = Traits
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
using boost::beast::static_string< N, CharT, Traits >::value_type = typename Traits::char_type

Constructor & Destructor Documentation

template<std::size_t N, class CharT , class Traits >
boost::beast::static_string< N, CharT, Traits >::static_string ( )

Default constructor (empty string).

template<std::size_t N, class CharT, class Traits >
boost::beast::static_string< N, CharT, Traits >::static_string ( size_type  count,
CharT  ch 
)

Construct with count copies of character ch.

The behavior is undefined if count >= npos

template<std::size_t N, class CharT, class Traits>
template<std::size_t M>
boost::beast::static_string< N, CharT, Traits >::static_string ( static_string< M, CharT, Traits > const &  other,
size_type  pos 
)

Construct with a substring (pos, other.size()) of other.

template<std::size_t N, class CharT, class Traits>
template<std::size_t M>
boost::beast::static_string< N, CharT, Traits >::static_string ( static_string< M, CharT, Traits > const &  other,
size_type  pos,
size_type  count 
)

Construct with a substring (pos, count) of other.

template<std::size_t N, class CharT, class Traits >
boost::beast::static_string< N, CharT, Traits >::static_string ( CharT const *  s,
size_type  count 
)

Construct with the first count characters of s, including nulls.

template<std::size_t N, class CharT, class Traits >
boost::beast::static_string< N, CharT, Traits >::static_string ( CharT const *  s)

Construct from a null terminated string.

template<std::size_t N, class CharT, class Traits>
template<class InputIt>
boost::beast::static_string< N, CharT, Traits >::static_string ( InputIt  first,
InputIt  last 
)

Construct from a range of characters.

template<std::size_t N, class CharT, class Traits >
boost::beast::static_string< N, CharT, Traits >::static_string ( static_string< N, CharT, Traits > const &  other)

Copy constructor.

template<std::size_t N, class CharT, class Traits>
template<std::size_t M>
boost::beast::static_string< N, CharT, Traits >::static_string ( static_string< M, CharT, Traits > const &  other)

Copy constructor.

template<std::size_t N, class CharT, class Traits >
boost::beast::static_string< N, CharT, Traits >::static_string ( std::initializer_list< CharT >  init)

Construct from an initializer list.

template<std::size_t N, class CharT, class Traits >
boost::beast::static_string< N, CharT, Traits >::static_string ( string_view_type  sv)
explicit

Construct from a string_view

template<std::size_t N, class CharT, class Traits>
template<class T, class >
boost::beast::static_string< N, CharT, Traits >::static_string ( T const &  t,
size_type  pos,
size_type  n 
)

Construct from any object convertible to string_view_type.

The range (pos, n) is extracted from the value obtained by converting t to string_view_type, and used to construct the string.

Member Function Documentation

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<std::size_t M>
auto boost::beast::static_string< N, CharT, Traits >::append ( static_string< M, CharT, Traits > const &  str,
size_type  pos,
size_type  count 
) -> static_string&
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::append ( size_type  count,
CharT  ch 
)
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<std::size_t M>
static_string& boost::beast::static_string< N, CharT, Traits >::append ( static_string< M, CharT, Traits > const &  str)
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<std::size_t M>
static_string& boost::beast::static_string< N, CharT, Traits >::append ( static_string< M, CharT, Traits > const &  str,
size_type  pos,
size_type  count = npos 
)
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::append ( CharT const *  s,
size_type  count 
)
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::append ( CharT const *  s)
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<class InputIt >
std::enable_if< detail::is_input_iterator<InputIt>::value, static_string&>::type boost::beast::static_string< N, CharT, Traits >::append ( InputIt  first,
InputIt  last 
)
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::append ( std::initializer_list< CharT >  init)
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::append ( string_view_type  sv)
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<class T >
std::enable_if< std::is_convertible<T const&, string_view_type>::value && ! std::is_convertible<T const&, CharT const*>::value, static_string&>::type boost::beast::static_string< N, CharT, Traits >::append ( T const &  t,
size_type  pos,
size_type  count = npos 
)
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<std::size_t M>
auto boost::beast::static_string< N, CharT, Traits >::assign ( static_string< M, CharT, Traits > const &  str,
size_type  pos,
size_type  count 
) -> static_string&
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<class InputIt>
auto boost::beast::static_string< N, CharT, Traits >::assign ( InputIt  first,
InputIt  last 
) -> static_string&
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<class T>
auto boost::beast::static_string< N, CharT, Traits >::assign ( T const &  t,
size_type  pos,
size_type  count 
) -> typename std::enable_if<std::is_convertible<T, string_view_type>::value, static_string&>::type
template<std::size_t N, class CharT, class Traits >
auto boost::beast::static_string< N, CharT, Traits >::assign ( size_type  count,
CharT  ch 
)

Assign count copies of ch.

template<std::size_t N, class CharT, class Traits >
auto boost::beast::static_string< N, CharT, Traits >::assign ( static_string< N, CharT, Traits > const &  str)

Assign from another static_string

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<std::size_t M>
static_string& boost::beast::static_string< N, CharT, Traits >::assign ( static_string< M, CharT, Traits > const &  str)
inline

Assign from another static_string

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<std::size_t M>
static_string& boost::beast::static_string< N, CharT, Traits >::assign ( static_string< M, CharT, Traits > const &  str,
size_type  pos,
size_type  count = npos 
)

Assign count characterss starting at npos from other.

template<std::size_t N, class CharT, class Traits >
auto boost::beast::static_string< N, CharT, Traits >::assign ( CharT const *  s,
size_type  count 
)

Assign the first count characters of s, including nulls.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::assign ( CharT const *  s)
inline

Assign a null terminated string.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<class InputIt >
static_string& boost::beast::static_string< N, CharT, Traits >::assign ( InputIt  first,
InputIt  last 
)

Assign from an iterator range of characters.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::assign ( std::initializer_list< CharT >  init)
inline

Assign from initializer list.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::assign ( string_view_type  str)
inline

Assign from string_view_type.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<class T >
std::enable_if<std::is_convertible<T, string_view_type>::value, static_string&>::type boost::beast::static_string< N, CharT, Traits >::assign ( T const &  t,
size_type  pos,
size_type  count = npos 
)

Assign from any object convertible to string_view_type.

The range (pos, n) is extracted from the value obtained by converting t to string_view_type, and used to assign the string.

template<std::size_t N, class CharT , class Traits >
auto boost::beast::static_string< N, CharT, Traits >::at ( size_type  pos)

Access specified character with bounds checking.

template<std::size_t N, class CharT , class Traits >
auto boost::beast::static_string< N, CharT, Traits >::at ( size_type  pos) const

Access specified character with bounds checking.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
CharT& boost::beast::static_string< N, CharT, Traits >::back ( )
inline

Accesses the last character.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
CharT const& boost::beast::static_string< N, CharT, Traits >::back ( ) const
inline

Accesses the last character.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
iterator boost::beast::static_string< N, CharT, Traits >::begin ( )
inline

Returns an iterator to the beginning.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
const_iterator boost::beast::static_string< N, CharT, Traits >::begin ( ) const
inline

Returns an iterator to the beginning.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
CharT const* boost::beast::static_string< N, CharT, Traits >::c_str ( ) const
inline

Returns a non-modifiable standard C character array version of the string.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
size_type constexpr boost::beast::static_string< N, CharT, Traits >::capacity ( ) const
inline

Returns the number of characters that can be held in currently allocated storage.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
const_iterator boost::beast::static_string< N, CharT, Traits >::cbegin ( ) const
inline

Returns an iterator to the beginning.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
const_iterator boost::beast::static_string< N, CharT, Traits >::cend ( ) const
inline

Returns an iterator to the end.

template<std::size_t N, class CharT , class Traits >
void boost::beast::static_string< N, CharT, Traits >::clear ( )

Clears the contents.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<std::size_t M>
int boost::beast::static_string< N, CharT, Traits >::compare ( static_string< M, CharT, Traits > const &  str) const
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<std::size_t M>
int boost::beast::static_string< N, CharT, Traits >::compare ( size_type  pos1,
size_type  count1,
static_string< M, CharT, Traits > const &  str 
) const
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<std::size_t M>
int boost::beast::static_string< N, CharT, Traits >::compare ( size_type  pos1,
size_type  count1,
static_string< M, CharT, Traits > const &  str,
size_type  pos2,
size_type  count2 = npos 
) const
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
int boost::beast::static_string< N, CharT, Traits >::compare ( CharT const *  s) const
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
int boost::beast::static_string< N, CharT, Traits >::compare ( size_type  pos1,
size_type  count1,
CharT const *  s 
) const
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
int boost::beast::static_string< N, CharT, Traits >::compare ( size_type  pos1,
size_type  count1,
CharT const *  s,
size_type  count2 
) const
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
int boost::beast::static_string< N, CharT, Traits >::compare ( string_view_type  str) const
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
int boost::beast::static_string< N, CharT, Traits >::compare ( size_type  pos1,
size_type  count1,
string_view_type  str 
) const
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<class T >
std::enable_if< std::is_convertible<T const&, string_view_type>::value && ! std::is_convertible<T const&, CharT const*>::value, int>::type boost::beast::static_string< N, CharT, Traits >::compare ( size_type  pos1,
size_type  count1,
T const &  t,
size_type  pos2,
size_type  count2 = npos 
) const
inline
template<std::size_t N, class CharT, class Traits >
auto boost::beast::static_string< N, CharT, Traits >::copy ( CharT *  dest,
size_type  count,
size_type  pos = 0 
) const

Copy a substring (pos, pos+count) to character string pointed to by dest.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
const_reverse_iterator boost::beast::static_string< N, CharT, Traits >::crbegin ( ) const
inline

Returns a reverse iterator to the beginning.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
const_reverse_iterator boost::beast::static_string< N, CharT, Traits >::crend ( ) const
inline

Returns a reverse iterator to the end.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
CharT* boost::beast::static_string< N, CharT, Traits >::data ( )
inline

Returns a pointer to the first character of a string.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
CharT const* boost::beast::static_string< N, CharT, Traits >::data ( ) const
inline

Returns a pointer to the first character of a string.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
bool boost::beast::static_string< N, CharT, Traits >::empty ( ) const
inline

Returns true if the string is empty.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
iterator boost::beast::static_string< N, CharT, Traits >::end ( )
inline

Returns an iterator to the end.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
const_iterator boost::beast::static_string< N, CharT, Traits >::end ( ) const
inline

Returns an iterator to the end.

template<std::size_t N, class CharT , class Traits >
auto boost::beast::static_string< N, CharT, Traits >::erase ( size_type  index = 0,
size_type  count = npos 
)
template<std::size_t N, class CharT , class Traits >
auto boost::beast::static_string< N, CharT, Traits >::erase ( const_iterator  pos)
template<std::size_t N, class CharT , class Traits >
auto boost::beast::static_string< N, CharT, Traits >::erase ( const_iterator  first,
const_iterator  last 
)
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
CharT& boost::beast::static_string< N, CharT, Traits >::front ( )
inline

Accesses the first character.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
CharT const& boost::beast::static_string< N, CharT, Traits >::front ( ) const
inline

Accesses the first character.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<std::size_t M>
auto boost::beast::static_string< N, CharT, Traits >::insert ( size_type  index,
static_string< M, CharT, Traits > const &  str,
size_type  index_str,
size_type  count 
) -> static_string&
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<class InputIt>
auto boost::beast::static_string< N, CharT, Traits >::insert ( const_iterator  pos,
InputIt  first,
InputIt  last 
) -> typename std::enable_if< detail::is_input_iterator<InputIt>::value, iterator>::type
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<class T>
auto boost::beast::static_string< N, CharT, Traits >::insert ( size_type  index,
const T &  t,
size_type  index_str,
size_type  count 
) -> typename std::enable_if<std::is_convertible< T const&, string_view_type>::value && ! std::is_convertible<T const&, CharT const*>::value, static_string&>::type
template<std::size_t N, class CharT, class Traits >
auto boost::beast::static_string< N, CharT, Traits >::insert ( size_type  index,
size_type  count,
CharT  ch 
)
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::insert ( size_type  index,
CharT const *  s 
)
inline
template<std::size_t N, class CharT, class Traits >
auto boost::beast::static_string< N, CharT, Traits >::insert ( size_type  index,
CharT const *  s,
size_type  count 
)
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<std::size_t M>
static_string& boost::beast::static_string< N, CharT, Traits >::insert ( size_type  index,
static_string< M, CharT, Traits > const &  str 
)
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<std::size_t M>
static_string& boost::beast::static_string< N, CharT, Traits >::insert ( size_type  index,
static_string< M, CharT, Traits > const &  str,
size_type  index_str,
size_type  count = npos 
)
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
iterator boost::beast::static_string< N, CharT, Traits >::insert ( const_iterator  pos,
CharT  ch 
)
inline
template<std::size_t N, class CharT, class Traits >
auto boost::beast::static_string< N, CharT, Traits >::insert ( const_iterator  pos,
size_type  count,
CharT  ch 
)
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<class InputIt >
std::enable_if< detail::is_input_iterator<InputIt>::value, iterator>::type boost::beast::static_string< N, CharT, Traits >::insert ( const_iterator  pos,
InputIt  first,
InputIt  last 
)
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
iterator boost::beast::static_string< N, CharT, Traits >::insert ( const_iterator  pos,
std::initializer_list< CharT >  init 
)
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::insert ( size_type  index,
string_view_type  str 
)
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<class T >
std::enable_if< std::is_convertible<T const&, string_view_type>::value && ! std::is_convertible<T const&, CharT const*>::value, static_string&>::type boost::beast::static_string< N, CharT, Traits >::insert ( size_type  index,
T const &  t,
size_type  index_str,
size_type  count = npos 
)
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
size_type boost::beast::static_string< N, CharT, Traits >::length ( ) const
inline

Returns the number of characters, excluding the null terminator.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
size_type constexpr boost::beast::static_string< N, CharT, Traits >::max_size ( ) const
inline

Returns the maximum number of characters that can be stored, excluding the null terminator.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
boost::beast::static_string< N, CharT, Traits >::operator string_view_type ( ) const
inline

Convert a static string to a string_view_type

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<std::size_t M>
static_string& boost::beast::static_string< N, CharT, Traits >::operator+= ( static_string< M, CharT, Traits > const &  str)
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::operator+= ( CharT  ch)
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::operator+= ( CharT const *  s)
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::operator+= ( std::initializer_list< CharT >  init)
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::operator+= ( string_view_type const &  str)
inline
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::operator= ( static_string< N, CharT, Traits > const &  str)
inline

Copy assignment.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<std::size_t M>
static_string& boost::beast::static_string< N, CharT, Traits >::operator= ( static_string< M, CharT, Traits > const &  str)
inline

Copy assignment.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::operator= ( CharT const *  s)
inline

Assign from null-terminated string.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::operator= ( CharT  ch)
inline

Assign from single character.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::operator= ( std::initializer_list< CharT >  init)
inline

Assign from initializer list.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
static_string& boost::beast::static_string< N, CharT, Traits >::operator= ( string_view_type  sv)
inline

Assign from string_view_type.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
reference boost::beast::static_string< N, CharT, Traits >::operator[] ( size_type  pos)
inline

Access specified character.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
const_reference boost::beast::static_string< N, CharT, Traits >::operator[] ( size_type  pos) const
inline

Access specified character.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
void boost::beast::static_string< N, CharT, Traits >::pop_back ( )
inline
template<std::size_t N, class CharT, class Traits >
void boost::beast::static_string< N, CharT, Traits >::push_back ( CharT  ch)
template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
reverse_iterator boost::beast::static_string< N, CharT, Traits >::rbegin ( )
inline

Returns a reverse iterator to the beginning.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
const_reverse_iterator boost::beast::static_string< N, CharT, Traits >::rbegin ( ) const
inline

Returns a reverse iterator to the beginning.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
reverse_iterator boost::beast::static_string< N, CharT, Traits >::rend ( )
inline

Returns a reverse iterator to the end.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
const_reverse_iterator boost::beast::static_string< N, CharT, Traits >::rend ( ) const
inline

Returns a reverse iterator to the end.

template<std::size_t N, class CharT , class Traits >
void boost::beast::static_string< N, CharT, Traits >::reserve ( std::size_t  n)

Reserves storage.

This actually just throws an exception if n > N, otherwise does nothing since the storage is fixed.

template<std::size_t N, class CharT , class Traits >
void boost::beast::static_string< N, CharT, Traits >::resize ( std::size_t  n)

Changes the number of characters stored.

If the resulting string is larger, the new characters are uninitialized.

template<std::size_t N, class CharT, class Traits >
void boost::beast::static_string< N, CharT, Traits >::resize ( std::size_t  n,
CharT  c 
)

Changes the number of characters stored.

If the resulting string is larger, the new characters are initialized to the value of c.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
void boost::beast::static_string< N, CharT, Traits >::shrink_to_fit ( )
inline

Reduces memory usage by freeing unused memory.

This actually does nothing, since the storage is fixed.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
size_type boost::beast::static_string< N, CharT, Traits >::size ( ) const
inline

Returns the number of characters, excluding the null terminator.

template<std::size_t N, class CharT , class Traits >
auto boost::beast::static_string< N, CharT, Traits >::substr ( size_type  pos = 0,
size_type  count = npos 
) const
template<std::size_t N, class CharT , class Traits >
void boost::beast::static_string< N, CharT, Traits >::swap ( static_string< N, CharT, Traits > &  str)

Exchange the contents of this string with another.

template<std::size_t N, class CharT, class Traits>
template<std::size_t M>
void boost::beast::static_string< N, CharT, Traits >::swap ( static_string< M, CharT, Traits > &  str)

Exchange the contents of this string with another.

Friends And Related Function Documentation

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
template<std::size_t , class , class >
friend class static_string
friend

Member Data Documentation

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
std::size_t constexpr boost::beast::static_string< N, CharT, Traits >::max_size_n = N
static

Maximum size of the string excluding the null terminator.

template<std::size_t N, class CharT = char, class Traits = std::char_traits<CharT>>
constexpr size_type boost::beast::static_string< N, CharT, Traits >::npos = size_type(-1)
static

A special index.


The documentation for this class was generated from the following files: