Quick Links:

bal | bbl | bdl | bsl

Classes | Defines | Typedefs | Enumerations | Enumerator | Functions | Variables | Friends

Component bslstl_string
[Package bslstl]

Provide a standard-compliant basic_string class template. More...

Classes

struct  bsl::String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, TYPE >
struct  bsl::String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, const CHAR_TYPE(&)[]>
struct  bsl::String_IsConvertibleToCString< CHAR_TYPE, TYPE >
struct  bsl::String_IsConvertibleToCString< CHAR_TYPE, const CHAR_TYPE(&)[]>
class  bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >
class  bsl::String_ClearProctor< FULL_STRING_TYPE >
class  bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >
struct  bsl::hash< basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > >

Defines

#define BSLSTL_CHAR_TRAITS   CHAR_TRAITS
#define BSLSTL_STRING_DEFINE_STRINGVIEW_LIKE_TYPE_IF_COMPLETE
#define BSLSTL_STRING_DEFINE_ONLY_CONVERTIBLE_TO_STRINGVIEW_RETURN_TYPE
#define BSLSTL_STRING_DECLARE_CONVERTIBLE_TO_STRINGVIEW_PARAM_VOID
#define BSLSTL_STRING_DEFINE_CONVERTIBLE_TO_STRINGVIEW_PARAM_VOID
#define BSLSTL_STRING_DECLARE_ONLY_CONVERTIBLE_TO_STRINGVIEW_PARAM_VOID
#define BSLSTL_STRING_DEFINE_ONLY_CONVERTIBLE_TO_STRINGVIEW_PARAM_VOID
#define BSLSTL_STRING_DECLARE_ONLY_CONVERTIBLE_TO_STRINGVIEW_PARAM_ALLOC
#define BSLSTL_STRING_DEFINE_ONLY_CONVERTIBLE_TO_STRINGVIEW_PARAM_ALLOC
#define BSLSTL_INSERT_RETURN_TYPE   typename basic_string<CHAR_TYPE,CHAR_TRAITS,ALLOCATOR>::iterator

Typedefs

typedef basic_string< char > bsl::string
typedef basic_string< wchar_t > bsl::wstring
typedef CHAR_TRAITS bsl::basic_string::traits_type
typedef CHAR_TRAITS::char_type bsl::basic_string::value_type
typedef ALLOCATOR bsl::basic_string::allocator_type
typedef AllocatorTraits::size_type bsl::basic_string::size_type
typedef
AllocatorTraits::difference_type 
bsl::basic_string::difference_type
typedef AllocatorTraits::pointer bsl::basic_string::pointer
typedef
AllocatorTraits::const_pointer 
bsl::basic_string::const_pointer
typedef value_type & bsl::basic_string::reference
typedef const value_type & bsl::basic_string::const_reference
typedef CHAR_TYPE * bsl::basic_string::iterator
typedef const CHAR_TYPE * bsl::basic_string::const_iterator
typedef bsl::reverse_iterator
< iterator > 
bsl::basic_string::reverse_iterator
typedef bsl::reverse_iterator
< const_iterator > 
bsl::basic_string::const_reverse_iterator

Enumerations

enum  bsl::String_Imp::ConfigurableParameters { bsl::String_Imp::BASIC_STRING_DEALLOCATE_IN_CLEAR = false, bsl::String_Imp::BASIC_STRING_HONOR_SHRINK_REQUEST = false }
enum  bsl::MaxDecimalStringLengths {
  bsl::e_MAX_SHORT_STRLEN10 = 2 + sizeof(short) * 3, bsl::e_MAX_INT_STRLEN10 = 2 + sizeof(int) * 3, bsl::e_MAX_INT64_STRLEN10 = 26, bsl::e_MAX_FLOAT_STRLEN10 = 48,
  bsl::e_MAX_DOUBLE_STRLEN10 = 318, bsl::e_MAX_LONGDOUBLE_STRLEN10 = 318, bsl::e_MAX_SCALAR_STRLEN10 = e_MAX_INT64_STRLEN10
}

Functions

 bsl::String_Imp::BSLMF_ASSERT (SHORT_BUFFER_BYTES >=sizeof(CHAR_TYPE *))
 bsl::String_Imp::BSLMF_NESTED_TRAIT_DECLARATION (String_Imp, BloombergLP::bslmf::IsBitwiseMoveable)
static SIZE_TYPE bsl::String_Imp::computeNewCapacity (SIZE_TYPE newLength, SIZE_TYPE oldCapacity, SIZE_TYPE maxSize)
 bsl::String_Imp::String_Imp ()
 bsl::String_Imp::String_Imp (SIZE_TYPE length, SIZE_TYPE capacity)
 bsl::String_Imp::String_Imp (const String_Imp &original)
 bsl::String_Imp::~String_Imp ()
String_Imp & bsl::String_Imp::operator= (const String_Imp &rhs)
void bsl::String_Imp::swap (String_Imp &other)
void bsl::String_Imp::resetFields ()
CHAR_TYPE * bsl::String_Imp::dataPtr ()
bool bsl::String_Imp::isShortString () const
const CHAR_TYPE * bsl::String_Imp::dataPtr () const
 bsl::String_ClearProctor::String_ClearProctor (FULL_STRING_TYPE *stringPtr)
 bsl::String_ClearProctor::~String_ClearProctor ()
void bsl::String_ClearProctor::release ()
 bsl::basic_string::BSLMF_NESTED_TRAIT_DECLARATION_IF (basic_string, BloombergLP::bslmf::IsBitwiseMoveable, BloombergLP::bslmf::IsBitwiseMoveable< ALLOCATOR >::value)
 bsl::basic_string::basic_string () BSLS_KEYWORD_NOEXCEPT
 bsl::basic_string::basic_string (const ALLOCATOR &basicAllocator) BSLS_KEYWORD_NOEXCEPT
 bsl::basic_string::basic_string (const basic_string &original)
 bsl::basic_string::basic_string (const basic_string &original, const ALLOCATOR &basicAllocator)
 bsl::basic_string::basic_string (BloombergLP::bslmf::MovableRef< basic_string > original) BSLS_KEYWORD_NOEXCEPT
 bsl::basic_string::basic_string (BloombergLP::bslmf::MovableRef< basic_string > original, const ALLOCATOR &basicAllocator)
 bsl::basic_string::basic_string (const basic_string &original, size_type position, const ALLOCATOR &basicAllocator=ALLOCATOR())
 bsl::basic_string::basic_string (const basic_string &original, size_type position, size_type numChars, const ALLOCATOR &basicAllocator=ALLOCATOR())
 bsl::basic_string::basic_string (const CHAR_TYPE *characterString, const ALLOCATOR &basicAllocator=ALLOCATOR())
 bsl::basic_string::basic_string (const CHAR_TYPE *characterString, size_type numChars, const ALLOCATOR &basicAllocator=ALLOCATOR())
 bsl::basic_string::basic_string (size_type numChars, CHAR_TYPE character, const ALLOCATOR &basicAllocator=ALLOCATOR())
template<class INPUT_ITER >
 bsl::basic_string::basic_string (INPUT_ITER first, INPUT_ITER last, const ALLOCATOR &basicAllocator=ALLOCATOR())
template<class ALLOC2 >
 bsl::basic_string::basic_string (const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &original, const ALLOCATOR &basicAllocator=ALLOCATOR())
 bsl::basic_string::basic_string (const BloombergLP::bslstl::StringRefData< CHAR_TYPE > &strRef, const ALLOCATOR &basicAllocator=ALLOCATOR())
template<class STRING_VIEW_LIKE_TYPE >
 bsl::basic_string::basic_string (const STRING_VIEW_LIKE_TYPE &object, typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value, const ALLOCATOR & >::type basicAllocator=ALLOCATOR())
template<class STRING_VIEW_LIKE_TYPE >
 bsl::basic_string::basic_string (const STRING_VIEW_LIKE_TYPE &object, size_type position, size_type numChars, const ALLOCATOR &basicAllocator=ALLOCATOR(), typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type *=0)
 bsl::basic_string::basic_string (std::initializer_list< CHAR_TYPE > values, const ALLOCATOR &basicAllocator=ALLOCATOR())
 bsl::basic_string::~basic_string ()
basic_string & bsl::basic_string::operator= (const basic_string &rhs)
template<class STRING_VIEW_LIKE_TYPE >
basic_string &operator=(BloombergLP::bslmf::MovableRef
< basic_string > rhs)
BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits 
bsl::basic_string::operator= (const STRING_VIEW_LIKE_TYPE &rhs) bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value, basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & >::type
basic_string & bsl::basic_string::operator= (const CHAR_TYPE *rhs)
basic_string & bsl::basic_string::operator= (CHAR_TYPE character)
template<class ALLOC2 >
basic_string & bsl::basic_string::operator= (const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &rhs)
basic_string & bsl::basic_string::operator= (std::initializer_list< CHAR_TYPE > values)
void bsl::basic_string::resize (size_type newLength, CHAR_TYPE character)
void bsl::basic_string::resize (size_type newLength)
void bsl::basic_string::reserve (size_type newCapacity=0)
void bsl::basic_string::shrink_to_fit ()
void bsl::basic_string::clear () BSLS_KEYWORD_NOEXCEPT
iterator bsl::basic_string::begin () BSLS_KEYWORD_NOEXCEPT
iterator bsl::basic_string::end () BSLS_KEYWORD_NOEXCEPT
reverse_iterator bsl::basic_string::rbegin () BSLS_KEYWORD_NOEXCEPT
reverse_iterator bsl::basic_string::rend () BSLS_KEYWORD_NOEXCEPT
reference bsl::basic_string::operator[] (size_type position)
reference bsl::basic_string::at (size_type position)
CHAR_TYPE & bsl::basic_string::front ()
CHAR_TYPE & bsl::basic_string::back ()
basic_string & bsl::basic_string::operator+= (const basic_string &rhs)
basic_string & bsl::basic_string::operator+= (const CHAR_TYPE *rhs)
basic_string & bsl::basic_string::operator+= (CHAR_TYPE character)
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if
< String_IsConvertibleToStringView
< CHAR_TYPE, CHAR_TRAITS,
typename bsl::enable_if
< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value
&&!String_IsConvertibleToCString
< CHAR_TYPE, typename
bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value, basic_string
< CHAR_TYPE, CHAR_TRAITS,
ALLOCATOR > & >::type 
bsl::basic_string::operator+= (const STRING_VIEW_LIKE_TYPE &rhs)
template<class ALLOC2 >
basic_string & bsl::basic_string::operator+= (const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &rhs)
basic_string & bsl::basic_string::append (const basic_string &suffix)
basic_string & bsl::basic_string::append (const basic_string &suffix, size_type position, size_type numChars=npos)
basic_string & bsl::basic_string::append (const CHAR_TYPE *characterString, size_type numChars)
basic_string & bsl::basic_string::append (const CHAR_TYPE *characterString)
basic_string & bsl::basic_string::append (size_type numChars, CHAR_TYPE character)
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if
< String_IsConvertibleToStringView
< CHAR_TYPE, CHAR_TRAITS,
typename bsl::enable_if
< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value
&&!String_IsConvertibleToCString
< CHAR_TYPE, typename
bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value, basic_string
< CHAR_TYPE, CHAR_TRAITS,
ALLOCATOR > & >::type 
bsl::basic_string::append (const STRING_VIEW_LIKE_TYPE &suffix)
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if
< String_IsConvertibleToStringView
< CHAR_TYPE, CHAR_TRAITS,
typename bsl::enable_if
< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value
&&!String_IsConvertibleToCString
< CHAR_TYPE, typename
bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value, basic_string
< CHAR_TYPE, CHAR_TRAITS,
ALLOCATOR > & >::type 
bsl::basic_string::append (const STRING_VIEW_LIKE_TYPE &suffix, size_type position, size_type numChars=npos)
template<class INPUT_ITER >
basic_string & bsl::basic_string::append (INPUT_ITER first, INPUT_ITER last)
basic_string & bsl::basic_string::append (std::initializer_list< CHAR_TYPE > values)
void bsl::basic_string::push_back (CHAR_TYPE character)
basic_string & bsl::basic_string::assign (const basic_string &replacement)
basic_string & bsl::basic_string::assign (BloombergLP::bslmf::MovableRef< basic_string > replacement) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(false)
basic_string & bsl::basic_string::assign (const basic_string &replacement, size_type position, size_type numChars=npos)
basic_string & bsl::basic_string::assign (const CHAR_TYPE *characterString)
basic_string & bsl::basic_string::assign (const CHAR_TYPE *characterString, size_type numChars)
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if
< String_IsConvertibleToStringView
< CHAR_TYPE, CHAR_TRAITS,
typename bsl::enable_if
< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value
&&!String_IsConvertibleToCString
< CHAR_TYPE, typename
bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value, basic_string
< CHAR_TYPE, CHAR_TRAITS,
ALLOCATOR > & >::type 
bsl::basic_string::assign (const STRING_VIEW_LIKE_TYPE &replacement)
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if
< String_IsConvertibleToStringView
< CHAR_TYPE, CHAR_TRAITS,
typename bsl::enable_if
< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value
&&!String_IsConvertibleToCString
< CHAR_TYPE, typename
bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value, basic_string
< CHAR_TYPE, CHAR_TRAITS,
ALLOCATOR > & >::type 
bsl::basic_string::assign (const STRING_VIEW_LIKE_TYPE &replacement, size_type position, size_type numChars=npos)
template<class ALLOC2 >
basic_string & bsl::basic_string::assign (const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &string)
basic_string & bsl::basic_string::assign (size_type numChars, CHAR_TYPE character)
template<class INPUT_ITER >
basic_string & bsl::basic_string::assign (INPUT_ITER first, INPUT_ITER last)
basic_string & bsl::basic_string::assign (std::initializer_list< CHAR_TYPE > values)
basic_string & bsl::basic_string::insert (size_type position, const basic_string &other)
basic_string & bsl::basic_string::insert (size_type position, const basic_string &other, size_type sourcePosition, size_type numChars=npos)
basic_string & bsl::basic_string::insert (size_type position, const CHAR_TYPE *characterString, size_type numChars)
basic_string & bsl::basic_string::insert (size_type position, const CHAR_TYPE *characterString)
basic_string & bsl::basic_string::insert (size_type position, size_type numChars, CHAR_TYPE character)
iterator bsl::basic_string::insert (const_iterator position, CHAR_TYPE character)
template<class INPUT_ITER >
iterator bsl::basic_string::insert (const_iterator position, INPUT_ITER first, INPUT_ITER last)
iterator bsl::basic_string::insert (const_iterator position, size_type numChars, CHAR_TYPE character)
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if
< String_IsConvertibleToStringView
< CHAR_TYPE, CHAR_TRAITS,
typename bsl::enable_if
< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value
&&!String_IsConvertibleToCString
< CHAR_TYPE, typename
bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value, basic_string
< CHAR_TYPE, CHAR_TRAITS,
ALLOCATOR > & >::type 
bsl::basic_string::insert (size_type position, const STRING_VIEW_LIKE_TYPE &other)
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if
< String_IsConvertibleToStringView
< CHAR_TYPE, CHAR_TRAITS,
typename bsl::enable_if
< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value
&&!String_IsConvertibleToCString
< CHAR_TYPE, typename
bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value, basic_string
< CHAR_TYPE, CHAR_TRAITS,
ALLOCATOR > & >::type 
bsl::basic_string::insert (size_type position, const STRING_VIEW_LIKE_TYPE &other, size_type sourcePosition, size_type numChars=npos)
iterator bsl::basic_string::insert (const_iterator position, std::initializer_list< CHAR_TYPE > values)
basic_string & bsl::basic_string::erase (size_type position=0, size_type numChars=npos)
iterator bsl::basic_string::erase (const_iterator position)
iterator bsl::basic_string::erase (const_iterator first, const_iterator last)
void bsl::basic_string::pop_back ()
basic_string & bsl::basic_string::replace (size_type outPosition, size_type outNumChars, const basic_string &replacement)
basic_string & bsl::basic_string::replace (size_type outPosition, size_type outNumChars, const basic_string &replacement, size_type position, size_type numChars=npos)
basic_string & bsl::basic_string::replace (size_type outPosition, size_type outNumChars, const CHAR_TYPE *characterString, size_type numChars)
basic_string & bsl::basic_string::replace (size_type outPosition, size_type outNumChars, const CHAR_TYPE *characterString)
basic_string & bsl::basic_string::replace (size_type outPosition, size_type outNumChars, size_type numChars, CHAR_TYPE character)
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if
< String_IsConvertibleToStringView
< CHAR_TYPE, CHAR_TRAITS,
typename bsl::enable_if
< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value
&&!String_IsConvertibleToCString
< CHAR_TYPE, typename
bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value, basic_string
< CHAR_TYPE, CHAR_TRAITS,
ALLOCATOR > & >::type 
bsl::basic_string::replace (size_type outPosition, size_type outNumChars, const STRING_VIEW_LIKE_TYPE &replacement)
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if
< String_IsConvertibleToStringView
< CHAR_TYPE, CHAR_TRAITS,
typename bsl::enable_if
< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value
&&!String_IsConvertibleToCString
< CHAR_TYPE, typename
bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value, basic_string
< CHAR_TYPE, CHAR_TRAITS,
ALLOCATOR > & >::type 
bsl::basic_string::replace (size_type outPosition, size_type outNumChars, const STRING_VIEW_LIKE_TYPE &replacement, size_type position, size_type numChars=npos)
basic_string & bsl::basic_string::replace (const_iterator first, const_iterator last, const basic_string &replacement)
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if
< String_IsConvertibleToStringView
< CHAR_TYPE, CHAR_TRAITS,
typename bsl::enable_if
< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value
&&!String_IsConvertibleToCString
< CHAR_TYPE, typename
bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE),
const STRING_VIEW_LIKE_TYPE & >
::type >::value, basic_string
< CHAR_TYPE, CHAR_TRAITS,
ALLOCATOR > & >::type 
bsl::basic_string::replace (const_iterator first, const_iterator last, const STRING_VIEW_LIKE_TYPE &replacement)
basic_string & bsl::basic_string::replace (const_iterator first, const_iterator last, const CHAR_TYPE *characterString, size_type numChars)
basic_string & bsl::basic_string::replace (const_iterator first, const_iterator last, const CHAR_TYPE *characterString)
basic_string & bsl::basic_string::replace (const_iterator first, const_iterator last, size_type numChars, CHAR_TYPE character)
template<class INPUT_ITER >
basic_string & bsl::basic_string::replace (const_iterator first, const_iterator last, INPUT_ITER stringFirst, INPUT_ITER stringLast)
CHAR_TYPE * bsl::basic_string::data () BSLS_KEYWORD_NOEXCEPT
const_iterator bsl::basic_string::cbegin () const BSLS_KEYWORD_NOEXCEPT
const_iterator bsl::basic_string::end () const BSLS_KEYWORD_NOEXCEPT
const_iterator bsl::basic_string::cend () const BSLS_KEYWORD_NOEXCEPT
const_reverse_iterator bsl::basic_string::rbegin () const BSLS_KEYWORD_NOEXCEPT
const_reverse_iterator bsl::basic_string::crbegin () const BSLS_KEYWORD_NOEXCEPT
const_reverse_iterator bsl::basic_string::rend () const BSLS_KEYWORD_NOEXCEPT
const_reverse_iterator bsl::basic_string::crend () const BSLS_KEYWORD_NOEXCEPT
size_type bsl::basic_string::length () const BSLS_KEYWORD_NOEXCEPT
size_type bsl::basic_string::size () const BSLS_KEYWORD_NOEXCEPT
size_type bsl::basic_string::max_size () const BSLS_KEYWORD_NOEXCEPT
size_type bsl::basic_string::capacity () const BSLS_KEYWORD_NOEXCEPT
bool bsl::basic_string::empty () const BSLS_KEYWORD_NOEXCEPT
const_reference bsl::basic_string::operator[] (size_type position) const
const_reference bsl::basic_string::at (size_type position) const
const CHAR_TYPE & bsl::basic_string::front () const
const CHAR_TYPE & bsl::basic_string::back () const
size_type bsl::basic_string::copy (CHAR_TYPE *characterString, size_type numChars, size_type position=0) const
const CHAR_TYPE * bsl::basic_string::c_str () const BSLS_KEYWORD_NOEXCEPT
const CHAR_TYPE * bsl::basic_string::data () const BSLS_KEYWORD_NOEXCEPT
allocator_type bsl::basic_string::get_allocator () const BSLS_KEYWORD_NOEXCEPT
size_type bsl::basic_string::find (const basic_string &substring, size_type position=0) const BSLS_KEYWORD_NOEXCEPT
template<class STRING_VIEW_LIKE_TYPE >
size_type bsl::basic_string::find (const STRING_VIEW_LIKE_TYPE &substring, size_type position=0, typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type *=0) const BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(true)
size_type bsl::basic_string::find (const CHAR_TYPE *substring, size_type position, size_type numChars) const
size_type bsl::basic_string::find (const CHAR_TYPE *substring, size_type position=0) const
size_type bsl::basic_string::find (CHAR_TYPE character, size_type position=0) const
size_type bsl::basic_string::rfind (const basic_string &substring, size_type position=npos) const BSLS_KEYWORD_NOEXCEPT
template<class STRING_VIEW_LIKE_TYPE >
size_type bsl::basic_string::rfind (const STRING_VIEW_LIKE_TYPE &substring, size_type position=npos, typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type *=0) const BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(true)
size_type bsl::basic_string::rfind (const CHAR_TYPE *characterString, size_type position, size_type numChars) const
size_type bsl::basic_string::rfind (const CHAR_TYPE *characterString, size_type position=npos) const
size_type bsl::basic_string::rfind (CHAR_TYPE character, size_type position=npos) const
size_type bsl::basic_string::find_first_of (const basic_string &characterString, size_type position=0) const BSLS_KEYWORD_NOEXCEPT
template<class STRING_VIEW_LIKE_TYPE >
size_type bsl::basic_string::find_first_of (const STRING_VIEW_LIKE_TYPE &characterString, size_type position=0, typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type *=0) const BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(true)
size_type bsl::basic_string::find_first_of (const CHAR_TYPE *characterString, size_type position, size_type numChars) const
size_type bsl::basic_string::find_first_of (const CHAR_TYPE *characterString, size_type position=0) const
size_type bsl::basic_string::find_first_of (CHAR_TYPE character, size_type position=0) const
size_type bsl::basic_string::find_last_of (const basic_string &characterString, size_type position=npos) const BSLS_KEYWORD_NOEXCEPT
template<class STRING_VIEW_LIKE_TYPE >
size_type bsl::basic_string::find_last_of (const STRING_VIEW_LIKE_TYPE &characterString, size_type position=npos, typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type *=0) const BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(true)
size_type bsl::basic_string::find_last_of (const CHAR_TYPE *characterString, size_type position, size_type numChars) const
size_type bsl::basic_string::find_last_of (const CHAR_TYPE *characterString, size_type position=npos) const
size_type bsl::basic_string::find_last_of (CHAR_TYPE character, size_type position=npos) const
size_type bsl::basic_string::find_first_not_of (const basic_string &characterString, size_type position=0) const BSLS_KEYWORD_NOEXCEPT
template<class STRING_VIEW_LIKE_TYPE >
size_type bsl::basic_string::find_first_not_of (const STRING_VIEW_LIKE_TYPE &characterString, size_type position=0, typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type *=0) const BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(true)
size_type bsl::basic_string::find_first_not_of (const CHAR_TYPE *characterString, size_type position, size_type numChars) const
size_type bsl::basic_string::find_first_not_of (const CHAR_TYPE *characterString, size_type position=0) const
size_type bsl::basic_string::find_first_not_of (CHAR_TYPE character, size_type position=0) const
size_type bsl::basic_string::find_last_not_of (const basic_string &characterString, size_type position=npos) const BSLS_KEYWORD_NOEXCEPT
template<class STRING_VIEW_LIKE_TYPE >
size_type bsl::basic_string::find_last_not_of (const STRING_VIEW_LIKE_TYPE &characterString, size_type position=npos, typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type *=0) const BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(true)
size_type bsl::basic_string::find_last_not_of (const CHAR_TYPE *characterString, size_type position, size_type numChars) const
size_type bsl::basic_string::find_last_not_of (const CHAR_TYPE *characterString, size_type position=npos) const
size_type bsl::basic_string::find_last_not_of (CHAR_TYPE character, size_type position=npos) const
bool bsl::basic_string::starts_with (basic_string_view< CHAR_TYPE, CHAR_TRAITS > characterString) const BSLS_KEYWORD_NOEXCEPT
bool bsl::basic_string::starts_with (CHAR_TYPE character) const BSLS_KEYWORD_NOEXCEPT
bool bsl::basic_string::starts_with (const CHAR_TYPE *characterString) const
bool bsl::basic_string::ends_with (basic_string_view< CHAR_TYPE, CHAR_TRAITS > characterString) const BSLS_KEYWORD_NOEXCEPT
bool bsl::basic_string::ends_with (CHAR_TYPE character) const BSLS_KEYWORD_NOEXCEPT
bool bsl::basic_string::ends_with (const CHAR_TYPE *characterString) const
basic_string bsl::basic_string::substr (size_type position=0, size_type numChars=npos) const
int bsl::basic_string::compare (const basic_string &other) const BSLS_KEYWORD_NOEXCEPT
int bsl::basic_string::compare (size_type position, size_type numChars, const basic_string &other) const
int bsl::basic_string::compare (size_type lhsPosition, size_type lhsNumChars, const basic_string &other, size_type otherPosition, size_type otherNumChars=npos) const
int bsl::basic_string::compare (const CHAR_TYPE *other) const
int bsl::basic_string::compare (size_type lhsPosition, size_type lhsNumChars, const CHAR_TYPE *other, size_type otherNumChars) const
int bsl::basic_string::compare (size_type lhsPosition, size_type lhsNumChars, const CHAR_TYPE *other) const
template<class STRING_VIEW_LIKE_TYPE >
int bsl::basic_string::compare (const STRING_VIEW_LIKE_TYPE &other, typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type *=0) const BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(true)
template<class STRING_VIEW_LIKE_TYPE >
int bsl::basic_string::compare (size_type position, size_type numChars, const STRING_VIEW_LIKE_TYPE &other, typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type *=0) const
template<class STRING_VIEW_LIKE_TYPE >
int bsl::basic_string::compare (size_type lhsPosition, size_type lhsNumChars, const STRING_VIEW_LIKE_TYPE &other, size_type otherPosition, size_type otherNumChars=npos, typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type *=0) const
template<class ALLOC2 >
 bsl::basic_string::operator std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > () const
 bsl::basic_string::operator basic_string_view< CHAR_TYPE, CHAR_TRAITS > () const
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator== (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &lhs, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator== (const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &lhs, const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator== (const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &lhs, const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator== (const CHAR_TYPE *lhs, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator== (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &lhs, const CHAR_TYPE *rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator!= (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &lhs, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator!= (const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &lhs, const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator!= (const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &lhs, const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator!= (const CHAR_TYPE *lhs, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator!= (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &lhs, const CHAR_TYPE *rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator< (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &lhs, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator< (const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &lhs, const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator< (const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &lhs, const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator< (const CHAR_TYPE *lhs, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator< (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &lhs, const CHAR_TYPE *rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator> (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &lhs, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator> (const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &lhs, const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator> (const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &lhs, const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator> (const CHAR_TYPE *lhs, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator> (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &lhs, const CHAR_TYPE *rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator<= (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &lhs, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator<= (const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &lhs, const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator<= (const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &lhs, const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator<= (const CHAR_TYPE *lhs, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator<= (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &lhs, const CHAR_TYPE *rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator>= (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &lhs, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator>= (const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &lhs, const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator>= (const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &lhs, const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &rhs) BSLS_KEYWORD_NOEXCEPT
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator>= (const CHAR_TYPE *lhs, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator>= (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &lhs, const CHAR_TYPE *rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE,
CHAR_TRAITS, ALLOCATOR > 
bsl::operator+ (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &lhs, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
basic_string< CHAR_TYPE,
CHAR_TRAITS, ALLOC2 > 
bsl::operator+ (const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &lhs, const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
basic_string< CHAR_TYPE,
CHAR_TRAITS, ALLOC1 > 
bsl::operator+ (const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &lhs, const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE,
CHAR_TRAITS, ALLOCATOR > 
bsl::operator+ (const CHAR_TYPE *lhs, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE,
CHAR_TRAITS, ALLOCATOR > 
bsl::operator+ (CHAR_TYPE lhs, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE,
CHAR_TRAITS, ALLOCATOR > 
bsl::operator+ (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &lhs, const CHAR_TYPE *rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE,
CHAR_TRAITS, ALLOCATOR > 
bsl::operator+ (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &lhs, CHAR_TYPE rhs)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
std::basic_ostream< CHAR_TYPE,
CHAR_TRAITS > & 
bsl::operator<< (std::basic_ostream< CHAR_TYPE, CHAR_TRAITS > &os, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &str)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
std::basic_istream< CHAR_TYPE,
CHAR_TRAITS > & 
bsl::operator>> (std::basic_istream< CHAR_TYPE, CHAR_TRAITS > &is, basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &str)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
void bsl::swap (basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &a, basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &b) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(BSLS_KEYWORD_NOEXCEPT_OPERATOR(a.swap(b)))
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
std::basic_istream< CHAR_TYPE,
CHAR_TRAITS > & 
bsl::getline (std::basic_istream< CHAR_TYPE, CHAR_TRAITS > &is, basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &str, CHAR_TYPE delim)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
std::basic_istream< CHAR_TYPE,
CHAR_TRAITS > & 
bsl::getline (std::basic_istream< CHAR_TYPE, CHAR_TRAITS > &is, basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &str)
int bsl::stoi (const string &str, std::size_t *pos=0, int base=10)
long bsl::stol (const string &str, std::size_t *pos=0, int base=10)
unsigned long bsl::stoul (const string &str, std::size_t *pos=0, int base=10)
long long bsl::stoll (const string &str, std::size_t *pos=0, int base=10)
unsigned long long bsl::stoull (const string &str, std::size_t *pos=0, int base=10)
float bsl::stof (const string &str, std::size_t *pos=0)
double bsl::stod (const string &str, std::size_t *pos=0)
long double bsl::stold (const string &str, std::size_t *pos=0)
string bsl::to_string (int value)
string bsl::to_string (long value)
string bsl::to_string (long long value)
string bsl::to_string (unsigned value)
string bsl::to_string (unsigned long value)
string bsl::to_string (unsigned long long value)
string bsl::to_string (float value)
string bsl::to_string (double value)
string bsl::to_string (long double value)
wstring bsl::to_wstring (int value)
wstring bsl::to_wstring (long value)
wstring bsl::to_wstring (long long value)
wstring bsl::to_wstring (unsigned value)
wstring bsl::to_wstring (unsigned long value)
wstring bsl::to_wstring (unsigned long long value)
wstring bsl::to_wstring (float value)
wstring bsl::to_wstring (double value)
wstring bsl::to_wstring (long double value)
template<class HASHALG , class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
void bsl::hashAppend (HASHALG &hashAlg, const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &input)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
std::size_t bsl::hashBasicString (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &str)
std::size_t bsl::hashBasicString (const string &str)
std::size_t bsl::hash< basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > >::operator() (const CHAR_TYPE *input) const
std::size_t bsl::hash< basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > >::operator() (const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &input) const

Variables

CHAR_TYPE *   bsl::String_Imp::d_start_p
union {
   BloombergLP::bsls::AlignedBuffer
< SHORT_BUFFER_BYTES,
BloombergLP::bsls::AlignmentFromType
< CHAR_TYPE >::VALUE >   d_short
   CHAR_TYPE *   bsl::String_Imp::d_start_p
}; 
SIZE_TYPE bsl::String_Imp::d_length
SIZE_TYPE bsl::String_Imp::d_capacity
static const size_type bsl::basic_string::npos = ~size_type(0)
void swap(basic_string &other)
BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits
const_iterator 
bsl::basic_string::begin () const BSLS_KEYWORD_NOEXCEPT

Friends

class bsl::basic_string::String_ClearProctor< basic_string >
string bsl::basic_string::to_string (int)
string bsl::basic_string::to_string (long)
string bsl::basic_string::to_string (long long)
string bsl::basic_string::to_string (unsigned)
string bsl::basic_string::to_string (unsigned long)
string bsl::basic_string::to_string (unsigned long long)

Detailed Description

Outline
Purpose:
Provide a standard-compliant basic_string class template.
Classes:
bsl::basic_string C++ standard compliant basic_string implementation
bsl::string typedef for bsl::basic_string<char>
bsl::wstring typedef for bsl::basic_string<wchar_t>/
Canonical Header:
bsl_string.h
See also:
ISO C++ Standard, Section 21 [strings]
Description:
This component defines a single class template basic_string, implementing standard containers, std::string and std::wstring, that hold a sequence of characters.
An instantiation of basic_string is an allocator-aware, value-semantic type whose salient attributes are its size (number of characters) and the sequence of characters that the string contains. The basic_string class is parameterized by the character type, CHAR_TYPE, that character type's traits, CHAR_TRAITS, and an allocator, ALLOCATOR. The traits for each character type provide functions that assign, compare, and copy a sequence of those characters.
A basic_string meets the requirements of a sequential container with random access iterators as specified in the [basic.string] section of the C++ standard [21.4]. The basic_string implemented here adheres to the C++11 standard, except that it does not have template specializations std::u16string and std::u32string. Note that excluded C++11 features are those that require (or are greatly simplified by) C++11 compiler support.
Memory Allocation:
The type supplied as a basic_strings ALLOCATOR template parameter determines how that basic_string will allocate memory. The basic_string template supports allocators meeting the requirements of the C++11 standard, in addition it supports scoped-allocators derived from the bslma::Allocator memory allocation protocol. Clients intending to use bslma style allocators should use the template's default ALLOCATOR type: The default type for the ALLOCATOR template parameter, bsl::allocator, provides a C++11 standard-compatible adapter for a bslma::Allocator object.
bslma-Style Allocators:
If the (template parameter) type ALLOCATOR of an basic_string instantiation is bsl::allocator, then objects of that basic_string type will conform to the standard behavior of a bslma-allocator-enabled type. Such a basic_string accepts an optional bslma::Allocator argument at construction. If the address of a bslma::Allocator object is explicitly supplied at construction, it is used to supply memory for the basic_string throughout its lifetime; otherwise, the basic_string will use the default allocator installed at the time of the basic_string's construction (see bslma_default).
Lexicographical Comparisons:
Two basic_strings lhs and rhs are lexicographically compared by first determining N, the smaller of the lengths of lhs and rhs, and comparing characters at each position between 0 and N - 1, using CHAR_TRAITS::lt in lexicographical fashion. If CHAR_TRAITS::lt determines that strings are non-equal (smaller or larger), then this is the result. Otherwise, the lengths of the strings are compared and the shorter string is declared the smaller. Lexicographical comparison returns equality only when both strings have the same length and the same character value in each respective position.
Operations:
This section describes the run-time complexity of operations on instances of basic_string:
  Legend
  ------
  'V'              - the 'CHAR_TYPE' template parameter type of the
                     'basic_string'
  'a', 'b'         - two distinct objects of type 'basic_string<V>'
  'k'              - an integral number
  'al'             - an STL-style memory allocator
  'i1', 'i2'       - two iterators defining a sequence of 'CHAR_TYPE'
                     characters
  'v'              - an object of type 'V'
  'p1', 'p2'       - two iterators belonging to 'a'
  distance(i1,i2)  - the number of values in the range [i1, i2)

  +-----------------------------------------+-------------------------------+
  | Operation                               | Complexity                    |
  |=========================================+===============================|
  | basic_string<V> a (default construction)| O[1]                          |
  | basic_string<V> a(al)                   |                               |
  |-----------------------------------------+-------------------------------|
  | basic_string<V> a(b) (copy construction)| O[n]                          |
  | basic_string<V> a(b, al)                |                               |
  |-----------------------------------------+-------------------------------|
  | basic_string<V> a(std::move(b))         | O[1]                          |
  | (move construction)                     |                               |
  |-----------------------------------------+-------------------------------|
  | basic_string<V> a(std::move(b), a1)     | O[n]                          |
  | (extended move construction)            |                               |
  |-----------------------------------------+-------------------------------|
  | basic_string<V> a(k)                    | O[n]                          |
  | basic_string<V> a(k, al)                |                               |
  |-----------------------------------------+-------------------------------|
  | basic_string<V> a(i1, i2)               | O[distance(i1,i2)]            |
  | basic_string<V> a(i1, i2, al)           |                               |
  |-----------------------------------------+-------------------------------|
  | a.~basic_string<V>()  (destruction)     | O[1]                          |
  |-----------------------------------------+-------------------------------|
  | get_allocator()                         | O[1]                          |
  |-----------------------------------------+-------------------------------|
  | a.begin(), a.end(),                     | O[1]                          |
  | a.cbegin(), a.cend(),                   |                               |
  | a.rbegin(), a.rend(),                   |                               |
  | a.crbegin(), a.crend()                  |                               |
  |-----------------------------------------+-------------------------------|
  | a.size()                                | O[1]                          |
  |-----------------------------------------+-------------------------------|
  | a.max_size()                            | O[1]                          |
  |-----------------------------------------+-------------------------------|
  | a.resize(k)                             | O[k]                          |
  | a.resize(k, v)                          |                               |
  |-----------------------------------------+-------------------------------|
  | a.empty()                               | O[1]                          |
  |-----------------------------------------+-------------------------------|
  | a.reserve(k)                            | O[1]                          |
  |-----------------------------------------+-------------------------------|
  | a.shrink_to_fit()                       | O[n]                          |
  |-----------------------------------------+-------------------------------|
  | a[k]                                    | O[1]                          |
  |-----------------------------------------+-------------------------------|
  | a.at(k)                                 | O[1]                          |
  |-----------------------------------------+-------------------------------|
  | a.front()                               | O[1]                          |
  |-----------------------------------------+-------------------------------|
  | a.back()                                | O[1]                          |
  |-----------------------------------------+-------------------------------|
  | a.push_back()                           | O[1]                          |
  |-----------------------------------------+-------------------------------|
  | a.pop_back()                            | O[1]                          |
  |-----------------------------------------+-------------------------------|
  | a += b;                                 | O[n]                          |
  |-----------------------------------------+-------------------------------|
  | a.append(b);                            | O[n]                          |
  |-----------------------------------------+-------------------------------|
  | a.assign(b);                            | O[n]                          |
  |-----------------------------------------+-------------------------------|
  | a.assign(std::move(b));                 | O[1] if the allocator can be  |
  |                                         | propagated on container move  |
  |                                         | assignment or 'a' and 'b' use |
  |                                         | the same allocator; O[n]      |
  |                                         | otherwise                     |
  |-----------------------------------------+-------------------------------|
  | a.assign(k, v)                          | O[k]                          |
  |-----------------------------------------+-------------------------------|
  | a.assign(i1, i2)                        | O[distance(i1,i2)]            |
  |-----------------------------------------+-------------------------------|
  | a.insert(p1, v)                         | O[1 + distance(p1, a.end())]  |
  |-----------------------------------------+-------------------------------|
  | a.insert(p1, k, v)                      | O[k + distance(p1, a.end())]  |
  |-----------------------------------------+-------------------------------|
  | a.insert(p1, i1, i2)                    | O[distance(i1, i2)            |
  |                                         |      + distance(p1, a.end())] |
  |-----------------------------------------+-------------------------------|
  | a.erase(p1)                             | O[1 + distance(p1, a.end())]  |
  |-----------------------------------------+-------------------------------|
  | a.erase(p1, p2)                         | O[1 + distance(p1, a.end())]  |
  |-----------------------------------------+-------------------------------|
  | a.swap(b), swap(a, b)                   | O[1] if 'a' and 'b' allocators|
  |                                         | compare equal, O[n + m]       |
  |                                         | otherwise                     |
  |-----------------------------------------+-------------------------------|
  | a.clear()                               | O[1]                          |
  |-----------------------------------------+-------------------------------|
  | a = b;              (assignment)        | O[n]                          |
  |-----------------------------------------+-------------------------------|
  | a = std::move(b);   (move assignment)   | O[1] if the allocator can be  |
  |                                         | propagated on container move  |
  |                                         | assignment or 'a' and 'b' use |
  |                                         | the same allocator; O[n]      |
  |                                         | otherwise                     |
  |-----------------------------------------+-------------------------------|
  | a == b, a != b                          | O[n]                          |
  |-----------------------------------------+-------------------------------|
  | a < b, a <= b, a > b, a >= b            | O[n]                          |
  +-----------------------------------------+-------------------------------+
User-defined literals:
The user-defined literal operators are declared for the bsl::string and bsl::wstring types. The ud-suffix _s is chosen to distinguish between the bsl-string's user-defined literal operators and the std-string's user-defined literal operator ""s introduced in the C++14 standard and implemented in the standard library provided by the compiler vendor. Note that the bsl-string's operator "" _s, unlike the std-string's operator ""s, can be used in a client's code if the compiler supports the C++11 standard. Also note that if the compiler supports the C++14 standard then the std-string's operator ""s can be used to initialize a bsl-string as follows:
 using namespace std::string_literals;
 bsl::string str = "test"s;
however such initialization introduces significant performance overhead due to extra std-string object creation/destruction.
Also note that bsl-string's user-defined literal operators are declared in the bsl::literals::string_literals namespace, where literals and string_literals are inline namespaces. Access to these operators can be gained with either using namespace bsl::literals, using namespace bsl::string_literals or using namespace bsl::literals::string_literals. But we recommend using namespace bsl::string_literals to minimize the scope of the using declaration:
 using namespace bsl::string_literals;
 bsl::string str = "test"_s;
Memory Allocation For a File-Scope Strings:
The operator "" _s uses the currently installed default allocator to supply memory. Note that the default allocator can become locked prior to entering main as a side-effect of initializing a file-scope static string object using operator "" _s. To avoid the default allocator locking an operator "" _S can be used instead. This operator uses the global allocator to supply memory and has no side-effects. (See the "Default Allocator" section in the bslma::Default component-level documentation for details.) For Example:
 using namespace bsl::string_literals;
 static const bsl::string s = "Use '_S' to initialize a file-scope string"_S;
Usage:
In this section we show intended use of this component.
Example 1: Basic Syntax:
In this example, we will show how to create and use the string typedef.
First, we will default-construct a string object:
  bsl::string s;
  assert(s.empty());
  assert(0  == s.size());
  assert("" == s);
Then, we will construct a string object from a string literal:
  bsl::string t = "Hello World";
  assert(!t.empty());
  assert(11 == t.size());
  assert("Hello World" == t);
Next, we will clear the contents of t and assign it a couple of values: first from a string literal; and second from another string object:
  t.clear();
  assert(t.empty());
  assert("" == t);

  t = "Good Morning";
  assert(!t.empty());
  assert("Good Morning" == t);

  t = s;
  assert(t.empty());
  assert("" == t);
  assert(t == s);
Then, we will create three string objects: the first representing a street name, the second a state, and the third a ZIP code. We will then concatenate them into a single address string and print the contents of that string on standard output:
  const bsl::string street  = "731 Lexington Avenue";
  const bsl::string state   = "NY";
  const bsl::string zipCode = "10022";

  const bsl::string fullAddress = street + " " + state + " " + zipCode;

  bsl::cout << fullAddress << bsl::endl;
The above print statement should produce a single line of output:
  731 Lexington Avenue NY 10022
Then, we search the contents of address (using the find function) to determine if it lies on a specified street:
  const bsl::string streetName = "Lexington";

  if (bsl::string::npos != fullAddress.find(streetName, 0)) {
      bsl::cout << "The address " << fullAddress << " is located on "
                << streetName << "." << bsl::endl;
  }
Next, we show how to get a reference providing modifiable access to the null-terminated string literal stored by a string object using the c_str function. Note that the returned string literal can be passed to various standard functions expecting a null-terminated string:
  const bsl::string  v = "Another string";
  const char        *cs = v.c_str();
  assert(bsl::strlen(cs) == v.size());
Then, we construct two string objects, x and y, using a user-specified allocator:
  bslma::TestAllocator allocator1, allocator2;

  const char *SHORT_STRING = "A small string";
  const char *LONG_STRING  = "This long string would definitely cause "
                             "memory to be allocated on creation";

  const bsl::string x(SHORT_STRING, &allocator1);
  const bsl::string y(LONG_STRING,  &allocator2);

  assert(SHORT_STRING == x);
  assert(LONG_STRING  == y);
Notice that, no memory was allocated from the allocator for object x because of the short-string optimization used in the string type.
Finally, we can track memory usage of x and y using allocator1 and allocator2 and check that memory was allocated only by allocator2:
  assert(0 == allocator1.numBlocksInUse());
  assert(1 == allocator2.numBlocksInUse());
Example 2: string as a data member:
The most common use of string objects are as data members in user-defined classes. In this example, we will show how string objects can be used as data members.
First, we begin to define a class, Employee, that represents the data corresponding to an employee of a company:
  class Employee {
      // This simply constrained (value-semantic) attribute class represents
      // the information about an employee.  An employee's first and last
      // name are represented as 'string' objects and their employee
      // identification number is represented by an 'int'.  Note that the
      // class invariants are identically the constraints on the individual
      // attributes.
      //
      // This class:
      //: o supports a complete set of *value-semantic* operations
      //:   o except for BDEX serialization
      //: o is *exception-neutral* (agnostic)
      //: o is *alias-safe*
      //: o is 'const' *thread-safe*

      // DATA
      bsl::string d_firstName;       // first name
      bsl::string d_lastName;        // last name
      int         d_id;              // identification number
Next, we define the creators for this class:
    public:
      // CREATORS
      Employee(bslma::Allocator *basicAllocator = 0);
          // Create a 'Employee' object having the (default) attribute
          // values:
          //..
          //  firstName() == ""
          //  lastName()  == ""
          //  id()        == 0
          //..
          // Optionally specify a 'basicAllocator' used to supply memory.  If
          // 'basicAllocator' is 0, the currently installed default
          // allocator is used.

      Employee(const bsl::string_view&  firstName,
               const bsl::string_view&  lastName,
               int                      id,
               bslma::Allocator        *basicAllocator = 0);
          // Create a 'Employee' object having the specified 'firstName',
          // 'lastName', and 'id'' attribute values.  Optionally specify a
          // 'basicAllocator' used to supply memory.  If 'basicAllocator' is
          // 0, the currently installed default allocator is used.

      Employee(const Employee&   original,
               bslma::Allocator *basicAllocator = 0);
          // Create a 'Employee' object having the same value as the
          // specified 'original' object.  Optionally specify a
          // 'basicAllocator' used to supply memory.  If 'basicAllocator' is
          // 0, the currently installed default allocator is used.

          // Destroy this object.
Notice that all constructors of the Employee class are optionally provided an allocator that is then passed through to the string data members of Employee. This allows the user to control how memory is allocated by Employee objects. Also note that the type of the firstName and lastName arguments of the value constructor is bsl::string_view. The bsl::string_view allows specifying a string or a const char * to represent a string value. For the sake of brevity its implementation is not explored here.
Then, declare the remaining methods of the class:
      // MANIPULATORS
      Employee& operator=(const Employee& rhs);
          // Assign to this object the value of the specified 'rhs' object,
          // and return a reference providing modifiable access to this
          // object.

      void setFirstName(const bsl::string_view& value);
          // Set the 'firstName' attribute of this object to the specified
          // 'value'.

      void setLastName(const bsl::string_view& value);
          // Set the 'lastName' attribute of this object to the specified
          // 'value'.

      void setId(int value);
          // Set the 'id' attribute of this object to the specified 'value'.

      // ACCESSORS
      const bsl::string& firstName() const;
          // Return a reference providing non-modifiable access to the
          // 'firstName' attribute of this object.

      const bsl::string& lastName() const;
          // Return a reference providing non-modifiable access to the
          // 'lastName' attribute of this object.

      int id() const;
          // Return the value of the 'id' attribute of this object.
  };
Next, we declare the free operators for Employee:
  inline
  bool operator==(const Employee& lhs, const Employee& rhs);
      // Return 'true' if the specified 'lhs' and 'rhs' objects have the same
      // value, and 'false' otherwise.  Two 'Employee' objects have the
      // same value if all of their corresponding values of their
      // 'firstName', 'lastName', and 'id' attributes are the same.

  inline
  bool operator!=(const Employee& lhs, const Employee& rhs);
      // Return 'true' if the specified 'lhs' and 'rhs' objects do not have
      // the same value, and 'false' otherwise.  Two 'Employee' objects do
      // not have the same value if any of the corresponding values of their
      // 'firstName', 'lastName', or 'id' attributes are not the same.
Then, we implement the various methods of the Employee class:
  // CREATORS
  inline
  Employee::Employee(bslma::Allocator *basicAllocator)
  : d_firstName(basicAllocator)
  , d_lastName(basicAllocator)
  , d_id(0)
  {
  }

  inline
  Employee::Employee(const bsl::string_view&  firstName,
                     const bsl::string_view&  lastName,
                     int                      id,
                     bslma::Allocator        *basicAllocator)
  : d_firstName(firstName.begin(), firstName.end(), basicAllocator)
  , d_lastName(lastName.begin(), lastName.end(), basicAllocator)
  , d_id(id)
  {
      BSLS_ASSERT_SAFE(!firstName.empty());
      BSLS_ASSERT_SAFE(!lastName.empty());
  }

  inline
  Employee::Employee(const Employee&   original,
                     bslma::Allocator *basicAllocator)
  : d_firstName(original.d_firstName, basicAllocator)
  , d_lastName(original.d_lastName, basicAllocator)
  , d_id(original.d_id)
  {
  }
Notice that the basicAllocator parameter can simply be passed as an argument to the constructor of bsl::string.
Now, we implement the remaining manipulators of the Employee class:
  // MANIPULATORS
  inline
  Employee& Employee::operator=(const Employee& rhs)
  {
      d_firstName = rhs.d_firstName;
      d_lastName  = rhs.d_lastName;
      d_id        = rhs.d_id;
      return *this;
  }

  inline
  void Employee::setFirstName(const bsl::string_view& value)
  {
      BSLS_ASSERT_SAFE(!value.empty());

      d_firstName.assign(value.begin(), value.end());
  }

  inline
  void Employee::setLastName(const bsl::string_view& value)
  {
      BSLS_ASSERT_SAFE(!value.empty());

      d_lastName.assign(value.begin(), value.end());
  }

  inline
  void Employee::setId(int value)
  {
      d_id = value;
  }

  // ACCESSORS
  inline
  const bsl::string& Employee::firstName() const
  {
      return d_firstName;
  }

  inline
  const bsl::string& Employee::lastName() const
  {
      return d_lastName;
  }

  inline
  int Employee::id() const
  {
      return d_id;
  }
Finally, we implement the free operators for Employee class:
  inline
  bool operator==(const Employee& lhs, const Employee& rhs)
  {
      return lhs.firstName() == rhs.firstName()
          && lhs.lastName()  == rhs.lastName()
          && lhs.id()        == rhs.id();
  }

  inline
  bool operator!=(const Employee& lhs, const Employee& rhs)
  {
      return lhs.firstName() != rhs.firstName()
          || lhs.lastName()  != rhs.lastName()
          || lhs.id()        != rhs.id();
  }
Example 3: A stream text replacement filter:
In this example, we will utilize the string type and its associated utility functions to define a function that reads data from an input stream, replaces all occurrences of a specified text fragment with another text fragment, and writes the resulting text to an output stream.
First, we define the signature of the function, replace:
  void replace(bsl::ostream&      outputStream,
               bsl::istream&      inputStream,
               const bsl::string& oldString,
               const bsl::string& newString)
      // Read data from the specified 'inputStream' and replace all
      // occurrences of the text contained in the specified 'oldString' in
      // the stream with the text contained in the specified 'newString'.
      // Write the modified data to the specified 'outputStream'.
Then, we provide the implementation for replace:
  {
      const bsl::string::size_type oldStringSize = oldString.size();
      const bsl::string::size_type newStringSize = newString.size();
      bsl::string                  line;

      bsl::getline(inputStream, line);
Notice that we can use the getline free function defined in this component to read a single line of data from an input stream into a bsl::string.
      if (!inputStream) {
          return;                                                   // RETURN
      }

      do {
Next, we use the find function to search the contents of line for characters matching the contents of oldString:
          int pos = line.find(oldString);
          while (bsl::string::npos != pos) {
Now, we use the replace method to modify the contents of line matching oldString to newString:
              line.replace(pos, oldStringSize, newString);
              pos = line.find(oldString, pos + newStringSize);
Notice that we provide find with the starting position from which to start searching.
          }
Finally, we write the updated contents of line to the output stream:
          outputStream << line;

          bsl::getline(inputStream, line);
      } while (inputStream);
  }

Define Documentation

#define BSLSTL_CHAR_TRAITS   CHAR_TRAITS
#define BSLSTL_STRING_DEFINE_STRINGVIEW_LIKE_TYPE_IF_COMPLETE
Value:
typename bsl::enable_if<0 != sizeof(STRING_VIEW_LIKE_TYPE),                   \
                        const STRING_VIEW_LIKE_TYPE&>::type

We need to use an intermediate completeness test to work around deficiencies with SFINAE in the Sun and AIX compilers.

#define BSLSTL_STRING_DEFINE_ONLY_CONVERTIBLE_TO_STRINGVIEW_RETURN_TYPE
Value:
typename bsl::enable_if<                                                  \
        String_IsConvertibleToStringView<                                     \
               CHAR_TYPE,                                                     \
               CHAR_TRAITS,                                                   \
               BSLSTL_STRING_DEFINE_STRINGVIEW_LIKE_TYPE_IF_COMPLETE>::value  \
     && !String_IsConvertibleToCString<                                       \
              CHAR_TYPE,                                                      \
              BSLSTL_STRING_DEFINE_STRINGVIEW_LIKE_TYPE_IF_COMPLETE>::value,  \
         basic_string<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>&>::type
#define BSLSTL_STRING_DECLARE_CONVERTIBLE_TO_STRINGVIEW_PARAM_VOID
Value:
,          \
    typename bsl::enable_if<                                                  \
        String_IsConvertibleToStringView<                                     \
               CHAR_TYPE,                                                     \
               CHAR_TRAITS,                                                   \
               BSLSTL_STRING_DEFINE_STRINGVIEW_LIKE_TYPE_IF_COMPLETE>::value  \
    >::type * = 0
#define BSLSTL_STRING_DEFINE_CONVERTIBLE_TO_STRINGVIEW_PARAM_VOID
Value:
,           \
    typename bsl::enable_if<                                                  \
        String_IsConvertibleToStringView<                                     \
               CHAR_TYPE,                                                     \
               CHAR_TRAITS,                                                   \
               BSLSTL_STRING_DEFINE_STRINGVIEW_LIKE_TYPE_IF_COMPLETE>::value  \
    >::type *
#define BSLSTL_STRING_DECLARE_ONLY_CONVERTIBLE_TO_STRINGVIEW_PARAM_VOID
Value:
,     \
    typename bsl::enable_if<                                                  \
        String_IsConvertibleToStringView<                                     \
               CHAR_TYPE,                                                     \
               CHAR_TRAITS,                                                   \
               BSLSTL_STRING_DEFINE_STRINGVIEW_LIKE_TYPE_IF_COMPLETE>::value  \
     && !String_IsConvertibleToCString<                                       \
              CHAR_TYPE,                                                      \
              BSLSTL_STRING_DEFINE_STRINGVIEW_LIKE_TYPE_IF_COMPLETE>::value   \
    >::type * = 0
#define BSLSTL_STRING_DEFINE_ONLY_CONVERTIBLE_TO_STRINGVIEW_PARAM_VOID
Value:
,      \
    typename bsl::enable_if<                                                  \
        String_IsConvertibleToStringView<                                     \
               CHAR_TYPE,                                                     \
               CHAR_TRAITS,                                                   \
               BSLSTL_STRING_DEFINE_STRINGVIEW_LIKE_TYPE_IF_COMPLETE>::value  \
     && !String_IsConvertibleToCString<                                       \
              CHAR_TYPE,                                                      \
              BSLSTL_STRING_DEFINE_STRINGVIEW_LIKE_TYPE_IF_COMPLETE>::value   \
    >::type *
#define BSLSTL_STRING_DECLARE_ONLY_CONVERTIBLE_TO_STRINGVIEW_PARAM_ALLOC
Value:
,    \
    typename bsl::enable_if<                                                  \
        String_IsConvertibleToStringView<                                     \
               CHAR_TYPE,                                                     \
               CHAR_TRAITS,                                                   \
               BSLSTL_STRING_DEFINE_STRINGVIEW_LIKE_TYPE_IF_COMPLETE>::value  \
     && !String_IsConvertibleToCString<                                       \
              CHAR_TYPE,                                                      \
              BSLSTL_STRING_DEFINE_STRINGVIEW_LIKE_TYPE_IF_COMPLETE>::value   \
    , const ALLOCATOR&>::type basicAllocator = ALLOCATOR()
#define BSLSTL_STRING_DEFINE_ONLY_CONVERTIBLE_TO_STRINGVIEW_PARAM_ALLOC
Value:
,     \
    typename bsl::enable_if<                                                  \
        String_IsConvertibleToStringView<                                     \
               CHAR_TYPE,                                                     \
               CHAR_TRAITS,                                                   \
               BSLSTL_STRING_DEFINE_STRINGVIEW_LIKE_TYPE_IF_COMPLETE>::value  \
     && !String_IsConvertibleToCString<                                       \
              CHAR_TYPE,                                                      \
              BSLSTL_STRING_DEFINE_STRINGVIEW_LIKE_TYPE_IF_COMPLETE>::value   \
    , const ALLOCATOR&>::type basicAllocator
#define BSLSTL_INSERT_RETURN_TYPE   typename basic_string<CHAR_TYPE,CHAR_TRAITS,ALLOCATOR>::iterator

Typedef Documentation

typedef basic_string<char> bsl::string
typedef basic_string<wchar_t> bsl::wstring
template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
typedef CHAR_TRAITS bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::traits_type [inherited]
template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
typedef CHAR_TRAITS::char_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::value_type [inherited]
template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
typedef ALLOCATOR bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::allocator_type [inherited]
template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
typedef AllocatorTraits::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type [inherited]
template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
typedef AllocatorTraits::difference_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::difference_type [inherited]
template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
typedef AllocatorTraits::pointer bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::pointer [inherited]
template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
typedef AllocatorTraits::const_pointer bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::const_pointer [inherited]
template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
typedef value_type& bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::reference [inherited]
template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
typedef const value_type& bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::const_reference [inherited]
template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
typedef CHAR_TYPE* bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::iterator [inherited]
template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
typedef const CHAR_TYPE* bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::const_iterator [inherited]
template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
typedef bsl::reverse_iterator<iterator> bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::reverse_iterator [inherited]
template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
typedef bsl::reverse_iterator<const_iterator> bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::const_reverse_iterator [inherited]

Enumeration Type Documentation

template<class CHAR_TYPE, class SIZE_TYPE>
enum bsl::String_Imp::ConfigurableParameters [inherited]

These configurable parameters define various aspects of the string behavior when it's not strictly defined by the Standard.

Enumerator:
BASIC_STRING_DEALLOCATE_IN_CLEAR 
BASIC_STRING_HONOR_SHRINK_REQUEST 
Enumerator:
e_MAX_SHORT_STRLEN10 
e_MAX_INT_STRLEN10 
e_MAX_INT64_STRLEN10 
e_MAX_FLOAT_STRLEN10 
e_MAX_DOUBLE_STRLEN10 
e_MAX_LONGDOUBLE_STRLEN10 
e_MAX_SCALAR_STRLEN10 

Function Documentation

template<class CHAR_TYPE, class SIZE_TYPE>
bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::BSLMF_ASSERT ( SHORT_BUFFER_BYTES >=  sizeofCHAR_TYPE *  )  [inherited]
template<class CHAR_TYPE, class SIZE_TYPE>
bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::BSLMF_NESTED_TRAIT_DECLARATION ( String_Imp< CHAR_TYPE, SIZE_TYPE >  ,
BloombergLP::bslmf::IsBitwiseMoveable   
) [inherited]

CHAR_TYPE is required to be a POD as per the Standard, which makes CHAR_TYPE bitwise-movable, so String_Imp is also bitwise-movable.

template<class CHAR_TYPE , class SIZE_TYPE>
SIZE_TYPE bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::computeNewCapacity ( SIZE_TYPE  newLength,
SIZE_TYPE  oldCapacity,
SIZE_TYPE  maxSize 
) [static, inherited]

Compute and return the capacity required for a string having the specified newLength and using the specified oldCapacity to exercise an exponential capacity growth necessary to ensure the amortized linear complexity of push_back and other operations and ensuring that the new capacity does not exceed the specified maxSize. Note that the behavior is undefined unless newLength > oldCapacity, newLength < maxSize, and oldCapacity < maxSize.

References BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class SIZE_TYPE >
BSLS_PLATFORM_AGGRESSIVE_INLINE bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::String_Imp (  )  [inherited]

Create a String_Imp object having (default) attribute values except that the d_capacity attribute is initialized with SHORT_BUFFER_CAPACITY.

template<class CHAR_TYPE , class SIZE_TYPE>
BSLS_PLATFORM_AGGRESSIVE_INLINE bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::String_Imp ( SIZE_TYPE  length,
SIZE_TYPE  capacity 
) [inherited]

Create a String_Imp object and initialize the d_length and d_capacity attributes with the specified length and specified capacity, respectively. If capacity is less than SHORT_BUFFER_CAPACITY, then d_capacity is set to SHORT_BUFFER_CAPACITY. The value of the d_short and d_start_p fields are left uninitialized. basic_string is required to assign either d_short or d_start_p to a proper value before using any methods of this class.

template<class CHAR_TYPE, class SIZE_TYPE>
bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::String_Imp ( const String_Imp< CHAR_TYPE, SIZE_TYPE > &  original  )  [inherited]

Create a String_Imp object having the same value as the specified original object. Note that this copy constructor is generated by the compiler.

template<class CHAR_TYPE, class SIZE_TYPE>
bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::~String_Imp (  )  [inherited]

Destroy this object. Note that this destructor is generated by the compiler.

template<class CHAR_TYPE, class SIZE_TYPE>
String_Imp& bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::operator= ( const String_Imp< CHAR_TYPE, SIZE_TYPE > &  rhs  )  [inherited]

Assign to this object the value of the specified rhs object, and return a reference providing modifiable access to this object. Note that this assignment operator is generated by the compiler.

template<class CHAR_TYPE , class SIZE_TYPE >
void bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::swap ( String_Imp< CHAR_TYPE, SIZE_TYPE > &  other  )  [inherited]

Efficiently exchange the value of this object with the value of the specified other object. This method provides the no-throw exception-safety guarantee.

References bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::d_capacity, bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::d_length, bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::d_start_p, and bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::isShortString().

template<class CHAR_TYPE , class SIZE_TYPE >
void bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::resetFields (  )  [inline, inherited]
template<class CHAR_TYPE , class SIZE_TYPE >
CHAR_TYPE * bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::dataPtr (  )  [inline, inherited]

Return an address providing modifiable access to the NULL-terminated C-string stored by this string object. Note that the returned address can point to either the internal short string buffer or the externally allocated memory depending on the type of the string defined by the return value of isShortString.

References bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::d_short, bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::d_start_p, and bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::isShortString().

Referenced by bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::compare().

template<class CHAR_TYPE , class SIZE_TYPE >
bool bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::isShortString (  )  const [inline, inherited]

Return true if this object contains a short string and the string data is stored in the short string buffer, and false if the object contains a long string (and the short string buffer contains a pointer to the string data allocated externally).

References bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::d_capacity.

Referenced by bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::dataPtr(), and bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::swap().

template<class CHAR_TYPE , class SIZE_TYPE >
const CHAR_TYPE * bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::dataPtr (  )  const [inline, inherited]

Return an address providing non-modifiable access to the NULL-terminated C-string stored by this string object. Note that the returned address can point to either the internal short string buffer or the externally allocated memory depending on the type of the string defined by the return value of isShortString.

References bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::d_short, bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::d_start_p, and bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::isShortString().

template<class FULL_STRING_TYPE >
bsl::String_ClearProctor< FULL_STRING_TYPE >::String_ClearProctor ( FULL_STRING_TYPE *  stringPtr  )  [explicit, inherited]

Create a String_ClearProctor for the specified stringPtr, and set both the length of stringPtr to 0 and the first character of stringPtr to CHAR_TYPE().

template<class FULL_STRING_TYPE >
bsl::String_ClearProctor< FULL_STRING_TYPE >::~String_ClearProctor (  )  [inherited]

Destroy this object, and if release has not been called, restore the original state of the string supplied at construction.

template<class FULL_STRING_TYPE >
void bsl::String_ClearProctor< FULL_STRING_TYPE >::release (  )  [inherited]

Release the proctor indicating that the string state need not to be restored.

template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::BSLMF_NESTED_TRAIT_DECLARATION_IF ( basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >  ,
BloombergLP::bslmf::IsBitwiseMoveable  ,
BloombergLP::bslmf::IsBitwiseMoveable< ALLOCATOR >::value   
) [inherited]

CHAR_TYPE is required to be a POD as per the Standard, which makes CHAR_TYPE bitwise-movable, so basic_string is bitwise-movable as long as the (template parameter) type ALLOCATOR is also bitwise-movable.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string (  )  [inline, inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string ( const ALLOCATOR &  basicAllocator  )  [inline, explicit, inherited]

Create an empty string. Optionally specify the basicAllocator used to supply memory. If basicAllocator is not specified, a default-constructed allocator is used.

References bdlat_ValueTypeFunctions::assign(), and bsl::begin().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  original  )  [inherited]

Create a string that has the same value as the specified original string. Use the allocator returned by 'bslallocator_traits<ALLOCATOR>:: select_on_container_copy_construction(original.get_allocator())' to supply memory.

References bsl::String_Imp< CHAR_TYPE, allocator_traits< ALLOCATOR >::size_type >::isShortString().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  original,
const ALLOCATOR &  basicAllocator 
) [inherited]

Create a string that has the same value as the specified original string and uses the specified basicAllocator to supply memory.

Note that it is important to have two copy constructors instead of a single:

          basic_string(const basic_string& original,
                       const ALLOCATOR&    basicAllocator = ALLOCATOR());

When the copy constructor with the default allocator is used, xlC10 gets confused and refuses to use the return value optimization, which then causes extra allocations when returning by value in operator+.

References bsl::String_Imp< CHAR_TYPE, allocator_traits< ALLOCATOR >::size_type >::isShortString().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string ( BloombergLP::bslmf::MovableRef< basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > >  original  )  [inline, inherited]

Create a string that has the same value as the specified original string by moving (in constant time) the contents of original to the new string. The allocator associated with original is propagated for use in the newly-created string. original is left in a valid but unspecified state.

References bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::resetFields().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string ( BloombergLP::bslmf::MovableRef< basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > >  original,
const ALLOCATOR &  basicAllocator 
) [inline, inherited]

Create a string that has the same value as the specified original string that uses the specified basicAllocator to supply memory. The contents of original are moved (in constant time) to the new string if basicAllocator == original.get_allocator(), and are copied (in linear time) using basicAllocator otherwise. original is left in a valid but unspecified state.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::get_allocator(), bsl::String_Imp< CHAR_TYPE, allocator_traits< ALLOCATOR >::size_type >::isShortString(), and bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::resetFields().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  original,
size_type  position,
const ALLOCATOR &  basicAllocator = ALLOCATOR() 
) [inherited]

Create a string that has the same value as the substring starting at the specified position in the specified original string. Optionally specify the basicAllocator used to supply memory. If basicAllocator is not specified, a default-constructed allocator is used. Throw out_of_range if position > original.length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::npos.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  original,
size_type  position,
size_type  numChars,
const ALLOCATOR &  basicAllocator = ALLOCATOR() 
) [inherited]

Create a string that has the same value as the substring of the specified numChars length starting at the specified position in the specified original string. If numChars equals npos, then the remaining length of the string is used (i.e., numChars is set to original.length() - position). Optionally specify the basicAllocator used to supply memory. If basicAllocator is not specified, a default-constructed allocator is used. Throw out_of_range if position > original.length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string ( const CHAR_TYPE *  characterString,
const ALLOCATOR &  basicAllocator = ALLOCATOR() 
) [inherited]

IMPLICIT: Create a string having the same value as the specified null-terminated characterString (of length CHAR_TRAITS::length(characterString)). Optionally specify a basicAllocator used to supply memory. If basicAllocator is not specified, a default-constructed allocator is used.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign(), and BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string ( const CHAR_TYPE *  characterString,
size_type  numChars,
const ALLOCATOR &  basicAllocator = ALLOCATOR() 
) [inherited]

Create a string that has the same value as the substring of the optionally specified numChars length starting at the beginning of the specified characterString. If numChars is not specified, CHAR_TRAITS::length(characterString) is used. Optionally specify the basicAllocator used to supply memory. If basicAllocator is not specified, a default-constructed allocator is used. Throw out_of_range if numChars >= npos.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign(), and BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string ( size_type  numChars,
CHAR_TYPE  character,
const ALLOCATOR &  basicAllocator = ALLOCATOR() 
) [inherited]

Create a string of the specified numChars length whose every position contains the specified character. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not specified, a default-constructed allocator is used.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class INPUT_ITER >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string ( INPUT_ITER  first,
INPUT_ITER  last,
const ALLOCATOR &  basicAllocator = ALLOCATOR() 
) [inline, inherited]

Create a string from the characters in the range starting at the specified first iterator and ending right before the specified last iterator of the (template parameter) type INPUT_ITER. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not specified, a default-constructed allocator is used. The behavior is undefined unless first and last refer to a sequence of valid values where first is at a position at or before last.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class ALLOC2 >
BSLS_PLATFORM_AGGRESSIVE_INLINE bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string ( const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  original,
const ALLOCATOR &  basicAllocator = ALLOCATOR() 
) [inherited]

IMPLICIT: Create a string that has the same value as the specified original string, where the type original is the string type native to the compiler's library, instantiated with the same character type and traits type, but not necessarily the same allocator type. The resulting string will contain the same sequence of characters as original. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not specified, then a default-constructed allocator is used.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string ( const BloombergLP::bslstl::StringRefData< CHAR_TYPE > &  strRef,
const ALLOCATOR &  basicAllocator = ALLOCATOR() 
) [inline, inherited]

IMPLICIT: Create a string that has the same value as the specified strRef string. The resulting string will contain the same sequence of characters as strRef. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not specified, then a default-constructed allocator is used.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string ( const STRING_VIEW_LIKE_TYPE &  object,
typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value, const ALLOCATOR & >::type  basicAllocator = ALLOCATOR() 
) [inline, explicit, inherited]

Create a string that has the same value as the specified object. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not specified, then a default-constructed allocator is used.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string ( const STRING_VIEW_LIKE_TYPE &  object,
size_type  position,
size_type  numChars,
const ALLOCATOR &  basicAllocator = ALLOCATOR(),
typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type = 0 
) [inline, inherited]

Create a string that has the same value as the substring of the specified numChars length starting at the specified position in the specified object. Optionally specify a basicAllocator used to supply memory. If the basicAllocator is not specified, a default-constructed allocator is used. Throw out_of_range if position > original.object().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string ( std::initializer_list< CHAR_TYPE >  values,
const ALLOCATOR &  basicAllocator = ALLOCATOR() 
) [inline, inherited]

Create a string and insert (in order) each CHAR_TYPE object in the specified values initializer list. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not specified, then a default-constructed allocator is used.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::~basic_string (  )  [inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator= ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  rhs  )  [inherited]

Assign to this string the value of the specified rhs string, propagate to this object the allocator of rhs if the ALLOCATOR type has trait propagate_on_container_copy_assignment, and return a reference providing modifiable access to this string.

References BSLS_PERFORMANCEHINT_PREDICT_LIKELY, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::data(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::get_allocator(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size().

Referenced by bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value, basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & >::type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator= ( const STRING_VIEW_LIKE_TYPE &  rhs  )  [inline, inherited]

< Assign to this string the value of the specified rhs string, propagate to this object the allocator of rhs if the ALLOCATOR type has trait propagate_on_container_move_assignment, and return a reference providing modifiable access to this string. The content of rhs is moved (in constant time) to this string if get_allocator() == rhs.get_allocator() (after accounting for the aforementioned trait). rhs is left in a valid but unspecified state. Assign to this string the value of the specified rhs object, and return a reference providing modifiable access to this string.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator= ( const CHAR_TYPE *  rhs  )  [inherited]

Assign to this string the value of the specified null-terminated rhs string (of length CHAR_TRAITS::length(characterString)), and return a reference providing modifiable access to this string.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign(), and BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator= ( CHAR_TYPE  character  )  [inherited]

Assign to this string the value of the string of length one consisting of the specified character, and return a reference providing modifiable access to this string.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class ALLOC2 >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator= ( const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  rhs  )  [inherited]

Assign to this string the value of the specified rhs string, and return a reference providing modifiable access to this string.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator= ( std::initializer_list< CHAR_TYPE >  values  )  [inherited]

Assign to this string the value resulting from first clearing this string and then inserting (in order) each CHAR_TYPE object in the specified values initializer list.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE void bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::resize ( size_type  newLength,
CHAR_TYPE  character 
) [inherited]

Change the length of this string to the specified newLength, erasing characters at the end if newLength < length() or appending the appropriate number of copies of the specified character at the end if length() < newLength.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE void bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::resize ( size_type  newLength  )  [inherited]

Change the length of this string to the specified newLength, erasing characters at the end if newLength < length() or appending the appropriate number of copies of CHAR_TYPE() at the end if length() < newLength.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE void bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::reserve ( size_type  newCapacity = 0  )  [inherited]

Change the capacity of this string to the specified newCapacity. Note that the capacity of a string is the maximum length it can accommodate without reallocation. The actual storage allocated may be higher.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

Referenced by bsl::operator+(), and bsl::operator>>().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE void bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::shrink_to_fit (  )  [inherited]

Request the removal of unused capacity by causing reallocation. Note that this method has no effect if the capacity is equal to the size. Also note that if (and only if) reallocation occurs, all iterators, including the past the end iterator, and all references to the elements are invalidated.

References bsl::String_Imp< CHAR_TYPE, allocator_traits< ALLOCATOR >::size_type >::d_capacity, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::data(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::get_allocator(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE void bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::clear (  )  [inherited]

Reset this string to an empty value. Note that the capacity may change (or not if BASIC_STRING_DEALLOCATE_IN_CLEAR is false). Note that the Standard doesn't allow to reduce capacity on clear.

References bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::BASIC_STRING_DEALLOCATE_IN_CLEAR.

Referenced by bsl::getline(), and bsl::operator>>().

template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin (  )  [inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::end (  )  [inline, inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::reverse_iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::rbegin (  )  [inline, inherited]

Return a reverse iterator referring to the last character in this modifiable string (or the past-the-end reverse iterator if this string is empty).

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::end().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::reverse_iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::rend (  )  [inline, inherited]

Return the past-the-end reverse iterator for this modifiable string.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::reference bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator[] ( size_type  position  )  [inline, inherited]

Return a reference providing modifiable access to the character at the specified position in this string if position < length(), or a reference providing non-modifiable access to the null-terminating character if position == length(). The behavior is undefined unless position <= length(), and, in the case of position == length(), the null-terminating character is not modified through the returned reference.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin(), BSLS_ASSERT_SAFE, and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::reference bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::at ( size_type  position  )  [inherited]

Return a reference providing modifiable access to the character at the specified position in this string. Throw out_of_range if position >= length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
CHAR_TYPE & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::front (  )  [inline, inherited]

Return a reference providing modifiable access to the character at the first position in this string. The behavior is undefined if this string is empty.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin(), BSLS_ASSERT_SAFE, and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::empty().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
CHAR_TYPE & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::back (  )  [inline, inherited]

Return a reference providing modifiable access to the character at the last position in this string. The behavior is undefined if this string is empty. Note that the last position is length() - 1.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin(), BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::empty(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator+= ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  rhs  )  [inherited]

Append the specified rhs string to this string, and return a reference providing modifiable access to this string.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator+= ( const CHAR_TYPE *  rhs  )  [inherited]

Append the specified null-terminated rhs string (of length CHAR_TRAITS::length(rhs)) to this string, and return a reference providing modifiable access to this string.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append(), and BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator+= ( CHAR_TYPE  character  )  [inherited]

Append the specified character to this string, and return a reference providing modifiable access to this string.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::push_back().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
BSLS_PLATFORM_AGGRESSIVE_INLINE bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value, basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & >::type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator+= ( const STRING_VIEW_LIKE_TYPE &  rhs  )  [inherited]

Append the specified rhs to this string, and return a reference providing modifiable access to this string.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class ALLOC2 >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator+= ( const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  rhs  )  [inherited]

Append the specified rhs string to this string, and return a reference providing modifiable access to this string.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  suffix  )  [inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  suffix,
size_type  position,
size_type  numChars = npos 
) [inherited]

Append to this string the optionally specified numChars characters starting at the specified position in the specified suffix, or the tail of suffix starting at position if position + numChars > suffix.length(). If numChars is not specified, npos is used. Return a reference providing modifiable access to this string. Throw out_of_range if position > suffix.length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::data(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append ( const CHAR_TYPE *  characterString,
size_type  numChars 
) [inherited]

Append to this string the specified initial numChars characters from the specified characterString, and return a reference providing modifiable access to this string. The behavior is undefined unless characterString is at least numChars long.

References BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append ( const CHAR_TYPE *  characterString  )  [inherited]

Append the specified null-terminated characterString (of length CHAR_TRAITS::length(characterString)) to this string, and return a reference providing modifiable access to this string.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append(), and BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append ( size_type  numChars,
CHAR_TYPE  character 
) [inherited]

Append the specified numChars copies of the specified character to this string, and return a reference providing modifiable access to this string.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
BSLS_PLATFORM_AGGRESSIVE_INLINE bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value, basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & >::type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append ( const STRING_VIEW_LIKE_TYPE &  suffix  )  [inherited]

Append to this string the bsl::string_view object, obtained from the specified suffix, and return a reference providing modifiable access to this string. Throw length_error if the length of the resulting string exceeds max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value, basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & >::type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append ( const STRING_VIEW_LIKE_TYPE &  suffix,
size_type  position,
size_type  numChars = npos 
) [inherited]

Append to this string the optionally specified numChars characters starting at the specified position in the bsl::string_view object, obtained from the specified suffix, or its tail starting at position if numChars exceeds the length of this tail. If numChars is not specified, npos is used. Return a reference providing modifiable access to this string. Throw out_of_range if position > strView.length(). Throw length_error if the length of the resulting string exceeds max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class INPUT_ITER >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append ( INPUT_ITER  first,
INPUT_ITER  last 
) [inherited]

Append to this string the characters in the range starting at the specified first iterator and ending right before the specified last iterator of the (template parameter) type INPUT_ITER. Return a reference providing modifiable access to this string. The behavior is undefined unless first and last refer to a sequence of valid values where first is at a position at or before last.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append ( std::initializer_list< CHAR_TYPE >  values  )  [inherited]

Append to this string each CHAR_TYPE object in the specified values initializer list, and return a reference providing modifiable access to this string.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
void bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::push_back ( CHAR_TYPE  character  )  [inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  replacement  )  [inherited]

Assign to this string the value of the specified replacement string, propagate to this object the allocator of replacement if the ALLOCATOR type has trait propagate_on_container_copy_assignment, and return a reference providing modifiable access to this string. Note that this method has exactly the same behavior as the corresponding operator=.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator=().

Referenced by bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::basic_string(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::erase(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator=(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::pop_back(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::push_back(), and bsl::basic_stringbuf< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::str().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign ( BloombergLP::bslmf::MovableRef< basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > >  replacement  )  [inline, inherited]

Assign to this string the value of the specified replacement string, propagate to this object the allocator of replacement if the ALLOCATOR type has trait propagate_on_container_move_assignment, and return a reference providing modifiable access to this string. The content of replacement is moved (in constant time) to this string if get_allocator() == rhs.get_allocator() (after accounting for the aforementioned trait). replacement is left in a valid but unspecified state. Note that this method has exactly the same behavior as the corresponding operator=.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  replacement,
size_type  position,
size_type  numChars = npos 
) [inherited]

Assign to this string the value of the optionally specified numChars characters starting at the specified position in the specified replacement string, or the suffix of replacement starting at position if position + numChars > replacement.length(). If numChars is not specified, npos is used. Return a reference providing modifiable access to this string. Throw out_of_range if position > replacement.length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::data(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign ( const CHAR_TYPE *  characterString  )  [inherited]

Assign to this string the value of the specified null-terminated characterString (of length CHAR_TRAITS::length(characterString)), and return a reference providing modifiable access to this string.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign(), and BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign ( const CHAR_TYPE *  characterString,
size_type  numChars 
) [inherited]

Assign to this string the specified initial numChars characters in the specified characterString, and return a reference providing modifiable access to this string. The behavior is undefined unless characterString is at least numChars long.

References BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
BSLS_PLATFORM_AGGRESSIVE_INLINE bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value, basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & >::type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign ( const STRING_VIEW_LIKE_TYPE &  replacement  )  [inherited]

Assign to this string the value of the specified replacement, and return a reference providing modifiable access to this string. Note that this method has exactly the same behavior as the corresponding operator=.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator=().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
BSLS_PLATFORM_AGGRESSIVE_INLINE bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value, basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & >::type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign ( const STRING_VIEW_LIKE_TYPE &  replacement,
size_type  position,
size_type  numChars = npos 
) [inherited]

Assign to this string the value of the optionally specified numChars characters starting at the specified position in the specified replacement, or the suffix of the replacement starting at position if position + numChars > replacement.length(). If numChars is not specified, npos is used. Return a reference providing modifiable access to this string. Throw out_of_range if position > replacement.length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class ALLOC2 >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign ( const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  string  )  [inherited]

Assign to this string the value of the specified string, and return a reference providing modifiable access to this string.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator=().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign ( size_type  numChars,
CHAR_TYPE  character 
) [inherited]

Assign to this string the value of a string of the specified numChars length whose every character is equal to the specified character, and return a reference providing modifiable access to this string.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class INPUT_ITER >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign ( INPUT_ITER  first,
INPUT_ITER  last 
) [inherited]

Assign to this string the characters in the range starting at the specified first iterator and ending right before the specified last iterator of the (template parameter) type INPUT_ITER. Return a reference providing modifiable access to this string. The behavior is undefined unless first and last refer to a sequence of valid values where first is at a position at or before last.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign ( std::initializer_list< CHAR_TYPE >  values  )  [inherited]

Assign to this string the value resulting from first clearing this string and then inserting (in order) each CHAR_TYPE object in the specified values initializer list. Return a reference providing modifiable access to this string.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert ( size_type  position,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  other 
) [inherited]

Insert at the specified position in this string a copy of the specified other string, and return a reference providing modifiable access to this string. Throw out_of_range if position > length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::npos.

Referenced by bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert ( size_type  position,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  other,
size_type  sourcePosition,
size_type  numChars = npos 
) [inherited]

Insert at the specified position in this string the optionally specified numChars characters starting at the specified sourcePosition in the specified other string, or the suffix of other starting at sourcePosition if sourcePosition + numChars > other.length(). If numChars is not specified, npos is used. Return a reference providing modifiable access to this string. Throw out_of_range if position > length() or sourcePosition > other.length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::data(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert ( size_type  position,
const CHAR_TYPE *  characterString,
size_type  numChars 
) [inherited]

Insert at the specified position in this string the specified initial numChars characters in the specified characterString, and return a reference providing modifiable access to this string. Throw out_of_range if position > length(). The behavior is undefined unless characterString is at least numChars long.

References BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert ( size_type  position,
const CHAR_TYPE *  characterString 
) [inherited]

Insert at the specified position in this string the specified null-terminated characterString (of length CHAR_TRAITS::length(characterString)), and return a reference providing modifiable access to this string. Throw out_of_range if position > length().

References BSLS_ASSERT_SAFE, and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert ( size_type  position,
size_type  numChars,
CHAR_TYPE  character 
) [inherited]

Insert at the specified position in this string the specified numChars copies of the specified character, and return a reference providing modifiable access to this string. Throw out_of_range if position > length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert ( const_iterator  position,
CHAR_TYPE  character 
) [inherited]

Insert the specified character at the specified position in this string, and return an iterator providing modifiable access to the inserted character. The behavior is undefined unless position is a valid iterator on this string.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin(), BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cbegin(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cend(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class INPUT_ITER >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert ( const_iterator  position,
INPUT_ITER  first,
INPUT_ITER  last 
) [inline, inherited]

Insert at the specified position in this string the characters in the range starting at the specified first iterator and ending right before the specified last iterator of the (template parameter) type INPUT_ITER, and return an iterator providing modifiable access to the first inserted character, or a non-'const' copy of position if first == last. The behavior is undefined unless position is a valid iterator on this string, and first and last refer to a sequence of valid values where first is at a position at or before last.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin(), BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cbegin(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cend().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert ( const_iterator  position,
size_type  numChars,
CHAR_TYPE  character 
) [inline, inherited]

Insert at the specified position in this string the specified numChars copies of the specified character, and return an iterator providing modifiable access to the first inserted character, or a non-'const' copy of position if 0 == numChars. The behavior is undefined unless position is a valid iterator on this string.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin(), BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cbegin(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cend(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value, basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & >::type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert ( size_type  position,
const STRING_VIEW_LIKE_TYPE &  other 
) [inherited]

Insert at the specified position in this string the bsl::string_view object, obtained from the specified other, and return a reference providing modifiable access to this string. Throw out_of_range if position > length(). Throw length_error if the length of the resulting string exceeds max_size().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value, basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & >::type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert ( size_type  position,
const STRING_VIEW_LIKE_TYPE &  other,
size_type  sourcePosition,
size_type  numChars = npos 
) [inherited]

Insert at the specified position in this string the optionally specified numChars characters starting at the specified sourcePosition in the bsl::string_view object, obtained from the specified other, or the suffix of this object starting at sourcePosition if sourcePosition + numChars > other.length(). If numChars is not specified, npos is used. Return a reference providing modifiable access to this string. Throw out_of_range if position > length() or sourcePosition > other.length(). Throw length_error if the length of the resulting string exceeds max_size().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert ( const_iterator  position,
std::initializer_list< CHAR_TYPE >  values 
) [inline, inherited]

Insert at the specified position in this string each CHAR_TYPE object in the specified values initializer list, and return an iterator to the first newly-inserted character. If an exception is thrown (other than by the copy constructor, move constructor, assignment operator, and move assignment operator of CHAR_TYPE), *this is unaffected. The behavior is undefined unless position is an iterator in the range [begin() .. end()] (both endpoints included).

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin(), BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cbegin(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cend().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::erase ( size_type  position = 0,
size_type  numChars = npos 
) [inherited]

Erase from this string the substring of length the optionally specified numChars or original.length() - position, whichever is smaller, starting at the optionally specified position. If position is not specified, the first position is used (i.e., position is set to 0). Return a reference providing modifiable access to this string. If numChars equals npos, then the remaining length of the string is erased (i.e., numChars is set to length() - position). Throw out_of_range if position > length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin(), bsl::String_Imp< CHAR_TYPE, allocator_traits< ALLOCATOR >::size_type >::d_length, bsl::String_Imp< CHAR_TYPE, allocator_traits< ALLOCATOR >::size_type >::dataPtr(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::erase ( const_iterator  position  )  [inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::erase ( const_iterator  first,
const_iterator  last 
) [inherited]

Erase from this string a substring defined by the specified pair of first and last iterators within this string. Return an iterator providing modifiable access to the character at the last position prior to erasing. If no such character exists, return end(). This method invalidates existing iterators pointing to first or a subsequent position. The behavior is undefined unless first and last are both within the range [cbegin() .. cend()] and 'first <= last'.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin(), BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cbegin(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cend(), bsl::String_Imp< CHAR_TYPE, allocator_traits< ALLOCATOR >::size_type >::d_length, bsl::String_Imp< CHAR_TYPE, allocator_traits< ALLOCATOR >::size_type >::dataPtr(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
void bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::pop_back (  )  [inline, inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace ( size_type  outPosition,
size_type  outNumChars,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  replacement 
) [inherited]

Replace the specified outNumChars characters starting at the specified outPosition in this string (or the suffix of this string starting at outPosition if outPosition + outNumChars > length()) with the specified replacement string, and return a reference providing modifiable access to this string. Throw out_of_range if outPosition > length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::data(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

Referenced by bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace ( size_type  outPosition,
size_type  outNumChars,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  replacement,
size_type  position,
size_type  numChars = npos 
) [inherited]

Replace the specified outNumChars characters starting at the specified outPosition in this string (or the suffix of this string starting at outPosition if outPosition + outNumChars > length()) with the optionally specified numChars characters starting at the specified position in the specified replacement string (or the suffix of replacement starting at position if position + numChars > replacement.length()). If numChars is not specified, npos is used. Return a reference providing modifiable access to this string. Throw out_of_range if outPosition > length() or position > replacement.length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::data(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace ( size_type  outPosition,
size_type  outNumChars,
const CHAR_TYPE *  characterString,
size_type  numChars 
) [inherited]

Replace the specified outNumChars characters starting at the specified outPosition in this string (or the suffix of this string starting at outPosition if outPosition + outNumChars > length()) with the specified initial numChars characters in the specified characterString. Return a reference providing modifiable access to this string. Throw out_of_range if outPosition > length(). The behavior is undefined unless characterString is at least numChars long.

References BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace ( size_type  outPosition,
size_type  outNumChars,
const CHAR_TYPE *  characterString 
) [inherited]

Replace the specified outNumChars characters starting at the specified outPosition in this string (or the suffix of this string starting at outPosition if outPosition + outNumChars > length()) with the specified null-terminated characterString (of length CHAR_TRAITS::length(characterString)). Return a reference providing modifiable access to this string. Throw out_of_range if outPosition > length().

References BSLS_ASSERT_SAFE, and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace ( size_type  outPosition,
size_type  outNumChars,
size_type  numChars,
CHAR_TYPE  character 
) [inherited]

Replace the specified outNumChars characters starting at the specified outPosition in this string (or the suffix of this string starting at outPosition if outPosition + outNumChars > length()) with the specified numChars copies of the specified character. Return a reference providing modifiable access to this string. Throw out_of_range if outPosition > length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value, basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & >::type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace ( size_type  outPosition,
size_type  outNumChars,
const STRING_VIEW_LIKE_TYPE &  replacement 
) [inherited]

Replace the specified outNumChars characters starting at the specified outPosition in this string (or the suffix of this string starting at outPosition if outPosition + outNumChars > length()) with the specified replacement, and return a reference providing modifiable access to this string. Throw out_of_range if outPosition > length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value, basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & >::type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace ( size_type  outPosition,
size_type  outNumChars,
const STRING_VIEW_LIKE_TYPE &  replacement,
size_type  position,
size_type  numChars = npos 
) [inherited]

Replace the specified outNumChars characters starting at the specified outPosition in this string (or the suffix of this string starting at outPosition if outPosition + outNumChars > length()) with the optionally specified numChars characters starting at the specified position in the specified replacement (or the suffix of replacement starting at position if position + numChars > replacement.length()). If numChars is not specified, npos is used. Return a reference providing modifiable access to this string. Throw out_of_range if outPosition > length() or position > replacement.length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace ( const_iterator  first,
const_iterator  last,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  replacement 
) [inherited]

Replace the substring in the range starting at the specified first position and ending right before the specified last position with the specified replacement string. Return a reference providing modifiable access to this string. The behavior is undefined unless first and last are both within the range [cbegin() .. cend()] and first <= last.

References BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cbegin(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cend(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::data(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value, basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & >::type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace ( const_iterator  first,
const_iterator  last,
const STRING_VIEW_LIKE_TYPE &  replacement 
) [inherited]

Replace the substring in the range starting at the specified first position and ending right before the specified last position with the specified replacement. Return a reference providing modifiable access to this string. The behavior is undefined unless first and last are both within the range [cbegin() .. cend()] and first <= last.

References BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cbegin(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cend(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace ( const_iterator  first,
const_iterator  last,
const CHAR_TYPE *  characterString,
size_type  numChars 
) [inherited]

Replace the substring in the range starting at the specified first position and ending right before the specified last position with the specified initial numChars characters in the specified characterString. Return a reference providing modifiable access to this string. The behavior is undefined unless first and last are both within the range [cbegin() .. cend()], first <= last, and characterString is at least numChars long.

References BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cbegin(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cend(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace ( const_iterator  first,
const_iterator  last,
const CHAR_TYPE *  characterString 
) [inherited]

Replace the substring in the range starting at the specified first position and ending right before the specified last position with the specified null-terminated characterString (of length CHAR_TRAITS::length(characterString)). Return a reference providing modifiable access to this string. The behavior is undefined unless first and last are both within the range [cbegin() .. cend()] and first <= last.

References BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cbegin(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cend(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace ( const_iterator  first,
const_iterator  last,
size_type  numChars,
CHAR_TYPE  character 
) [inherited]

Replace the substring in the range starting at the specified first position and ending right before the specified last position with the specified numChars copies of the specified character. Return a reference providing modifiable access to this string. The behavior is undefined unless first and last are both within the range [cbegin() .. cend()] and first <= last.

References BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cbegin(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cend(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class INPUT_ITER >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace ( const_iterator  first,
const_iterator  last,
INPUT_ITER  stringFirst,
INPUT_ITER  stringLast 
) [inline, inherited]

Replace the substring in the range starting at the specified first position and ending right before the specified last position with the characters in the range starting at the specified stringFirst iterator and ending right before the specified stringLast iterator of the (template parameter) type INPUT_ITER. Return a reference providing modifiable access to this string. The behavior is undefined unless first and last are both within the range [cbegin() .. cend()], first <= last, and stringFirst and stringLast refer to a sequence of valid values where stringFirst is at a position at or before stringLast.

References BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cbegin(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cend().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
CHAR_TYPE * bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::data (  )  [inline, inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::const_iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cbegin (  )  const [inline, inherited]

Return an iterator providing non-modifiable access to the first character of this string (or the past-the-end iterator if this string is empty).

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin().

Referenced by bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::erase(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::const_iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::end (  )  const [inline, inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::const_iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::cend (  )  const [inline, inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::const_reverse_iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::rbegin (  )  const [inline, inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::const_reverse_iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::crbegin (  )  const [inline, inherited]

Return a reverse iterator providing non-modifiable access to the last character of this string (or the past-the-end reverse iterator if this string is empty).

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::end().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::const_reverse_iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::rend (  )  const [inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::const_reverse_iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::crend (  )  const [inherited]

Return the past-the-end reverse iterator for this string.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length (  )  const [inline, inherited]

Return the length of this string. Note that this number may differ from CHAR_TRAITS::length(c_str()) in case the string contains null characters. Also note that a null-terminating character added by the c_str method is not counted in this length.

References bsl::String_Imp< CHAR_TYPE, allocator_traits< ALLOCATOR >::size_type >::d_length.

Referenced by bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::append(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::assign(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::at(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::back(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::compare(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::copy(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::ends_with(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::erase(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_not_of(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_of(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_not_of(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_of(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::insert(), bsl::operator+(), bsl::operator<(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator[](), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::pop_back(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::push_back(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::replace(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::rfind(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::shrink_to_fit(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::starts_with(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::~basic_string().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size (  )  const [inline, inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size (  )  const [inline, inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::capacity (  )  const [inline, inherited]

Return the capacity of this string, i.e., the maximum length for which resizing is guaranteed not to trigger a reallocation.

References bsl::String_Imp< CHAR_TYPE, allocator_traits< ALLOCATOR >::size_type >::d_capacity.

Referenced by bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::push_back(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::~basic_string().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bool bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::empty (  )  const [inline, inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::const_reference bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator[] ( size_type  position  )  const [inline, inherited]

Return a reference providing non-modifiable access to the character at the specified position in this string. The behavior is undefined unless position <= length(). Note that if position == length(), a reference to the null-terminating character is returned.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin(), BSLS_ASSERT_SAFE, and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::const_reference bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::at ( size_type  position  )  const [inherited]

Return a reference providing non-modifiable access to the character at the specified position in this string. Throw out_of_range if position >= length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
const CHAR_TYPE & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::front (  )  const [inline, inherited]

Return a reference providing non-modifiable access to the character at the first position in this string. The behavior is undefined if this string is empty.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin(), BSLS_ASSERT_SAFE, and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::empty().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
const CHAR_TYPE & bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::back (  )  const [inline, inherited]

Return a reference providing non-modifiable access to the character at the last position in this string. The behavior is undefined if this string is empty. Note that the last position is length() - 1.

References BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::empty(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::end().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::copy ( CHAR_TYPE *  characterString,
size_type  numChars,
size_type  position = 0 
) const [inherited]

Copy from this string, starting from the optionally specified position, the specified numChars or length() - position characters, whichever is smaller, into the specified characterString buffer, and return the number of characters copied. If position is not specified, 0 is used. Throw out_of_range if position > length(). The behavior is undefined unless characterString is at least numChars long. Note that the output characterString is not null-terminated.

References BSLS_ASSERT_SAFE, bsl::String_Imp< CHAR_TYPE, allocator_traits< ALLOCATOR >::size_type >::dataPtr(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
const CHAR_TYPE * bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::c_str (  )  const [inline, inherited]

Return an address providing non-modifiable access to the null-terminated buffer of length() + 1 characters whose contents are identical to the value of this string. Note that any call to the string destructor or any of its manipulators invalidates the returned pointer.

References bsl::String_Imp< CHAR_TYPE, allocator_traits< ALLOCATOR >::size_type >::dataPtr().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
const CHAR_TYPE * bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::data (  )  const [inline, inherited]

Return an address providing non-modifiable access to the null-terminated buffer of length() + 1 characters whose contents are identical to the value of this string. Note that any call to the string destructor or any of its manipulators invalidates the returned pointer.

References bsl::String_Imp< CHAR_TYPE, allocator_traits< ALLOCATOR >::size_type >::dataPtr().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::allocator_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::get_allocator (  )  const [inline, inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  substring,
size_type  position = 0 
) const [inherited]

Return the starting position of the first occurrence of the specified substring, if such a substring can be found in this string (on or after the optionally specified position if such a position is specified) using CHAR_TRAITS::eq to compare characters, and return npos otherwise.

Referenced by bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find ( const STRING_VIEW_LIKE_TYPE &  substring,
size_type  position = 0,
typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type = 0 
) const [inherited]

Return the starting position of the first occurrence of the specified substring, if such a substring can be found in this string (on or after the optionally specified position if such a position is specified) using CHAR_TRAITS::eq to compare characters, and return npos otherwise. The behavior is undefined unless the conversion from STRING_VIEW_LIKE_TYPE to bsl::basic_string_view<CHAR_TYPE, CHAR_TRAITS> does not throw any exception. Note that this behavior differs from the behavior implemented in the standard container, where the following noexcept specification is used:

         noexcept(
             std::is_nothrow_convertible_v<const T&,
                                           std::basic_string_view<CharT,
                                                                  Traits> >)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find ( const CHAR_TYPE *  substring,
size_type  position,
size_type  numChars 
) const [inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find ( const CHAR_TYPE *  substring,
size_type  position = 0 
) const [inherited]

Return the starting position of the first occurrence of the specified substring of the optionally specified numChars length, if such a substring can be found in this string (on or after the optionally specified position if such a position is specified) using CHAR_TRAITS::eq to compare characters, and return npos otherwise. If numChars is not specified, CHAR_TRAITS::length(substring) is used.

References BSLS_ASSERT_SAFE, and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find ( CHAR_TYPE  character,
size_type  position = 0 
) const [inherited]

Return the position of the first occurrence of the specified character, if such an occurrence can be found in this string (on or after the optionally specified position if such a position is specified), and return npos otherwise.

References bsl::String_Imp< CHAR_TYPE, allocator_traits< ALLOCATOR >::size_type >::dataPtr(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::npos.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::rfind ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  substring,
size_type  position = npos 
) const [inherited]

Return the starting position of the last occurrence of the specified substring within this string, if such a sequence can be found in this string (on or before the optionally specified position if such a position is specified) using CHAR_TRAITS::eq to compare characters, and return npos otherwise.

Referenced by bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::rfind().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::rfind ( const STRING_VIEW_LIKE_TYPE &  substring,
size_type  position = npos,
typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type = 0 
) const [inherited]

Return the starting position of the last occurrence of the specified substring within this string, if such a sequence can be found in this string (on or before the optionally specified position if such a position is specified) using CHAR_TRAITS::eq to compare characters, and return npos otherwise. The behavior is undefined unless the conversion from STRING_VIEW_LIKE_TYPE to bsl::basic_string_view<CHAR_TYPE, CHAR_TRAITS> does not throw any exception. Note that this behavior differs from the behavior implemented in the standard container, where the following noexcept specification is used:

         noexcept(
             std::is_nothrow_convertible_v<const T&,
                                           std::basic_string_view<CharT,
                                                                  Traits> >)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::rfind ( const CHAR_TYPE *  characterString,
size_type  position,
size_type  numChars 
) const [inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::rfind ( const CHAR_TYPE *  characterString,
size_type  position = npos 
) const [inherited]

Return the starting position of the last occurrence of a substring whose value equals that of the specified characterString of the optionally specified numChars length, if such a substring can be found in this string (on or before the optionally specified position if such a position is specified), and return npos otherwise. If numChars is not specified, CHAR_TRAITS::length(characterString) is used.

References BSLS_ASSERT_SAFE, and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::rfind().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::rfind ( CHAR_TYPE  character,
size_type  position = npos 
) const [inherited]

Return the position of the last occurrence of the specified character, if such an occurrence can be found in this string (on or before the optionally specified position if such a position is specified), and return npos otherwise.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::rfind().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_of ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  characterString,
size_type  position = 0 
) const [inherited]

Return the position of the first occurrence of a character belonging to the specified characterString, if such an occurrence can be found in this string (on or after the optionally specified position if such a position is specified), and return npos otherwise.

Referenced by bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_of().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_of ( const STRING_VIEW_LIKE_TYPE &  characterString,
size_type  position = 0,
typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type = 0 
) const [inherited]

Return the position of the first occurrence of a character belonging to the specified characterString, if such an occurrence can be found in this string (on or after the optionally specified position if such a position is specified), and return npos otherwise. The behavior is undefined unless the conversion from STRING_VIEW_LIKE_TYPE to bsl::basic_string_view<CHAR_TYPE, CHAR_TRAITS> does not throw any exception. Note that this behavior differs from the behavior implemented in the standard container, where the following noexcept specification is used:

         noexcept(
             std::is_nothrow_convertible_v<const T&,
                                           std::basic_string_view<CharT,
                                                                  Traits> >)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_of ( const CHAR_TYPE *  characterString,
size_type  position,
size_type  numChars 
) const [inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_of ( const CHAR_TYPE *  characterString,
size_type  position = 0 
) const [inherited]

Return the position of the first occurrence of a character belonging to the specified characterString of the optionally specified numChars length, if such an occurrence can be found in this string (on or after the optionally specified position if such a position is specified), and return npos otherwise. If numChars is not specified, CHAR_TRAITS::length(characterString) is used.

References BSLS_ASSERT_SAFE, and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_of().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_of ( CHAR_TYPE  character,
size_type  position = 0 
) const [inherited]

Return the position of the first occurrence of the specified character, if such an occurrence can be found in this string (on or after the optionally specified position if such a position is specified), and return npos otherwise.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_of().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_of ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  characterString,
size_type  position = npos 
) const [inherited]

Return the position of the last occurrence of a character belonging to the specified characterString, if such an occurrence can be found in this string (on or before the optionally specified position if such a position is specified), and return npos otherwise.

Referenced by bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_of().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_of ( const STRING_VIEW_LIKE_TYPE &  characterString,
size_type  position = npos,
typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type = 0 
) const [inherited]

Return the position of the last occurrence of a character belonging to the specified characterString, if such an occurrence can be found in this string (on or before the optionally specified position if such a position is specified), and return npos otherwise. The behavior is undefined unless the conversion from STRING_VIEW_LIKE_TYPE to bsl::basic_string_view<CHAR_TYPE, CHAR_TRAITS> does not throw any exception. Note that this behavior differs from the behavior implemented in the standard container, where the following noexcept specification is used:

         noexcept(
             std::is_nothrow_convertible_v<const T&,
                                           std::basic_string_view<CharT,
                                                                  Traits> >)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_of ( const CHAR_TYPE *  characterString,
size_type  position,
size_type  numChars 
) const [inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_of ( const CHAR_TYPE *  characterString,
size_type  position = npos 
) const [inherited]

Return the position of the last occurrence of a character belonging to the specified characterString of the optionally specified numChars length, if such an occurrence can be found in this string (on or before the optionally specified position if such a position is specified), and return npos otherwise. If numChars is not specified, CHAR_TRAITS::length(characterString) is used.

References BSLS_ASSERT_SAFE, and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_of().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_of ( CHAR_TYPE  character,
size_type  position = npos 
) const [inherited]

Return the position of the last occurrence of the specified character, if such an occurrence can be found in this string (on or before the optionally specified position if such a position is specified), and return npos otherwise.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_of().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_not_of ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  characterString,
size_type  position = 0 
) const [inherited]

Return the position of the first occurrence of a character not belonging to the specified characterString, if such an occurrence can be found in this string (on or after the optionally specified position if such a position is specified), and return npos otherwise.

Referenced by bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_not_of().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_not_of ( const STRING_VIEW_LIKE_TYPE &  characterString,
size_type  position = 0,
typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type = 0 
) const [inherited]

Return the position of the first occurrence of a character not belonging to the specified characterString, if such an occurrence can be found in this string (on or after the optionally specified position if such a position is specified), and return npos otherwise. The behavior is undefined unless the conversion from STRING_VIEW_LIKE_TYPE to bsl::basic_string_view<CHAR_TYPE, CHAR_TRAITS> does not throw any exception. Note that this behavior differs from the behavior implemented in the standard container, where the following noexcept specification is used:

         noexcept(
             std::is_nothrow_convertible_v<const T&,
                                           std::basic_string_view<CharT,
                                                                  Traits> >)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_not_of ( const CHAR_TYPE *  characterString,
size_type  position,
size_type  numChars 
) const [inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_not_of ( const CHAR_TYPE *  characterString,
size_type  position = 0 
) const [inherited]

Return the position of the first occurrence of a character not belonging to the specified characterString of the optionally specified numChars length, if such an occurrence can be found in this string (on or after the optionally specified position if such a position is specified), and return npos otherwise. If numChars is not specified, CHAR_TRAITS::length(characterString) is used.

References BSLS_ASSERT_SAFE, and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_not_of().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_not_of ( CHAR_TYPE  character,
size_type  position = 0 
) const [inherited]

Return the position of the first occurrence of a character different from the specified character, if such an occurrence can be found in this string (on or after the optionally specified position if such a position is specified), and return npos otherwise.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_first_not_of().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_not_of ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  characterString,
size_type  position = npos 
) const [inherited]

Return the position of the last occurrence of a character not belonging to the specified characterString, if such an occurrence can be found in this string (on or before the optionally specified position if such a position is specified), and return npos otherwise.

Referenced by bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_not_of().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_not_of ( const STRING_VIEW_LIKE_TYPE &  characterString,
size_type  position = npos,
typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type = 0 
) const [inherited]

Return the position of the last occurrence of a character not belonging to the specified characterString, if such an occurrence can be found in this string (on or before the optionally specified position if such a position is specified), and return npos otherwise. The behavior is undefined unless the conversion from STRING_VIEW_LIKE_TYPE to bsl::basic_string_view<CHAR_TYPE, CHAR_TRAITS> does not throw any exception. Note that this behavior differs from the behavior implemented in the standard container, where the following noexcept specification is used:

         noexcept(
             std::is_nothrow_convertible_v<const T&,
                                           std::basic_string_view<CharT,
                                                                  Traits> >)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_not_of ( const CHAR_TYPE *  characterString,
size_type  position,
size_type  numChars 
) const [inherited]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_not_of ( const CHAR_TYPE *  characterString,
size_type  position = npos 
) const [inherited]

Return the position of the last occurrence of a character not belonging to the specified characterString of the optionally specified numChars length, if such an occurrence can be found in this string (on or before the optionally specified position if such a position is specified), and return npos otherwise. If numChars is not specified, CHAR_TRAITS::length(characterString) is used.

References BSLS_ASSERT_SAFE, and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_not_of().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_not_of ( CHAR_TYPE  character,
size_type  position = npos 
) const [inherited]

Return the position of the last occurrence of a character different from the specified character, if such an occurrence can be found in this string (on or before the optionally specified position if such a position is specified), and return npos otherwise.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::find_last_not_of().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE bool bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::starts_with ( basic_string_view< CHAR_TYPE, CHAR_TRAITS >  characterString  )  const [inherited]

Return true if the length of this string is equal to or greater than the length of the specified characterString and the first characterString.length() characters of this string are equal to the characters of the characterString, and false otherwise. CHAR_TRAITS::compare is used to compare characters. See Lexicographical Comparisons.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE bool bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::starts_with ( CHAR_TYPE  character  )  const [inherited]

Return true if this string contains at least one symbol and the last symbol of this string is equal to the specified character, and false otherwise. CHAR_TRAITS::eq is used to compare characters. See Lexicographical Comparisons.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE bool bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::starts_with ( const CHAR_TYPE *  characterString  )  const [inherited]

Return true if the length of this string is equal to or greater than the length of the specified characterString and the first CHAR_TRAITS::length(characterString) characters of this string are equal to the characters of the characterString, and false otherwise. CHAR_TRAITS::compare is used to compare characters. See Lexicographical Comparisons.

References BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::data(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE bool bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::ends_with ( basic_string_view< CHAR_TYPE, CHAR_TRAITS >  characterString  )  const [inherited]

Return true if the length of this string is equal to or greater than the length of the specified characterString and the last characterString.length() characters of this string are equal to the characters of the characterString, and false otherwise. CHAR_TRAITS::compare is used to compare characters. See Lexicographical Comparisons.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE bool bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::ends_with ( CHAR_TYPE  character  )  const [inherited]

Return true if this string contains at least one symbol and the last symbol of this string is equal to the specified character, and false otherwise. CHAR_TRAITS::eq is used to compare characters. See Lexicographical Comparisons.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE bool bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::ends_with ( const CHAR_TYPE *  characterString  )  const [inherited]

Return true if the length of this string is equal to or greater than the length of the specified characterString and the last CHAR_TRAITS::length(characterString) characters of this string are equal to the characters of the characterString, and false otherwise. CHAR_TRAITS::compare is used to compare characters. See Lexicographical Comparisons.

References BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::data(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::substr ( size_type  position = 0,
size_type  numChars = npos 
) const [inherited]

Return a string whose value is the substring starting at the optionally specified position in this string, of length the optionally specified numChars or length() - position, whichever is smaller. If position is not specified, 0 is used (i.e., the substring is from the beginning of this string). If numChars is not specified, npos is used (i.e., the entire suffix from position to the end of the string is returned).

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE int bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::compare ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  other  )  const [inherited]

Lexicographically compare this string with the specified other string, and return a negative value if this string is less than other, a positive value if it is greater than other, and 0 in case of equality. CHAR_TRAITS::lt is used to compare characters. See Lexicographical Comparisons.

Referenced by bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::compare().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
int bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::compare ( size_type  position,
size_type  numChars,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  other 
) const [inherited]

Lexicographically compare the substring of this string of the specified numChars length starting at the specified position (or the suffix of this string starting at position if position + numChars > length()) with the specified other string, and return a negative value if the indicated substring of this string is less than other, a positive value if it is greater than other, and 0 in case of equality. CHAR_TRAITS::lt is used to compare characters. See Lexicographical Comparisons. Throw out_of_range if position > length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::data(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
int bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::compare ( size_type  lhsPosition,
size_type  lhsNumChars,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  other,
size_type  otherPosition,
size_type  otherNumChars = npos 
) const [inherited]

Lexicographically compare the substring of this string of the specified lhsNumChars length starting at the specified lhsPosition (or the suffix of this string starting at lhsPosition if lhsPosition + lhsNumChars > length()) with the substring of the specified other string of the optionally specified otherNumChars length starting at the specified otherPosition (or the suffix of other starting at otherPosition if otherPosition + otherNumChars > other.length()). If numChars is not specified, npos is used. Return a negative value if the indicated substring of this string is less than the indicated substring of other, a positive value if it is greater than the indicated substring of other, and 0 in case of equality. CHAR_TRAITS::lt is used to compare characters. Throw out_of_range if lhsPosition > length() or otherPosition > other.length(). See Lexicographical Comparisons.

References bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::dataPtr(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE int bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::compare ( const CHAR_TYPE *  other  )  const [inherited]

Lexicographically compare this string with the specified null-terminated other string (of length CHAR_TRAITS::length(other)), and return a negative value if this string is less than other, a positive value if it is greater than other, and 0 in case of equality. CHAR_TRAITS::lt is used to compare characters. See Lexicographical Comparisons.

References BSLS_ASSERT_SAFE, and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
int bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::compare ( size_type  lhsPosition,
size_type  lhsNumChars,
const CHAR_TYPE *  other,
size_type  otherNumChars 
) const [inherited]

Lexicographically compare the substring of this string of the specified lhsNumChars length starting at the specified lhsPosition (or the suffix of this string starting at lhsPosition if lhsPosition + lhsNumChars > length()) with the specified other string of the specified otherNumChars length, and return a negative value if the indicated substring of this string is less than other, a positive value if it is greater than other, and 0 in case of equality. CHAR_TRAITS::lt is used to compare characters. Throw out_of_range if lhsPosition > length(). See Lexicographical Comparisons.

References BSLS_ASSERT_SAFE, and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE int bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::compare ( size_type  lhsPosition,
size_type  lhsNumChars,
const CHAR_TYPE *  other 
) const [inherited]

Lexicographically compare the substring of this string of the specified lhsNumChars length starting at the specified lhsPosition (or the suffix of this string starting at lhsPosition if lhsPosition + lhsNumChars > length()) with the specified null-terminated other string (of length CHAR_TRAITS::length(other)), and return a negative value if the indicated substring of this string is less than other, a positive value if it is greater than other, and 0 in case of equality. CHAR_TRAITS::lt is used to compare characters. Throw out_of_range if lhsPosition > length(). See Lexicographical Comparisons.

References BSLS_ASSERT_SAFE, and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::compare().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
BSLS_PLATFORM_AGGRESSIVE_INLINE int bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::compare ( const STRING_VIEW_LIKE_TYPE &  other,
typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type = 0 
) const [inherited]

Lexicographically compare this string with the specified other, and return a negative value if this string is less than other, a positive value if it is greater than other, and 0 in case of equality. CHAR_TRAITS::lt is used to compare characters. See Lexicographical Comparisons. The behavior is undefined unless the conversion from STRING_VIEW_LIKE_TYPE to bsl::basic_string_view<CHAR_TYPE, CHAR_TRAITS> does not throw any exception. Note that this behavior differs from the behavior implemented in the standard container, where the following noexcept specification is used:

         noexcept(
             std::is_nothrow_convertible_v<const T&,
                                           std::basic_string_view<CharT,
                                                                  Traits> >)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
int bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::compare ( size_type  position,
size_type  numChars,
const STRING_VIEW_LIKE_TYPE &  other,
typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type = 0 
) const [inherited]

Lexicographically compare the substring of this string of the specified numChars length starting at the specified position (or the suffix of this string starting at position if position + numChars > length()) with the specified other, and return a negative value if the indicated substring of this string is less than other, a positive value if it is greater than other, and 0 in case of equality. CHAR_TRAITS::lt is used to compare characters. See Lexicographical Comparisons. Throw out_of_range if position > length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
template<class STRING_VIEW_LIKE_TYPE >
int bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::compare ( size_type  lhsPosition,
size_type  lhsNumChars,
const STRING_VIEW_LIKE_TYPE &  other,
size_type  otherPosition,
size_type  otherNumChars = npos,
typename bsl::enable_if< String_IsConvertibleToStringView< CHAR_TYPE, CHAR_TRAITS, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value &&!String_IsConvertibleToCString< CHAR_TYPE, typename bsl::enable_if< 0!=sizeof(STRING_VIEW_LIKE_TYPE), const STRING_VIEW_LIKE_TYPE & >::type >::value >::type = 0 
) const [inherited]

Lexicographically compare the substring of this string of the specified lhsNumChars length starting at the specified lhsPosition (or the suffix of this string starting at lhsPosition if lhsPosition + lhsNumChars > length()) with the substring of the specified other of the optionally specified otherNumChars length starting at the specified otherPosition (or the suffix of other starting at otherPosition if otherPosition + otherNumChars > other.length()). If numChars is not specified, npos is used. Return a negative value if the indicated substring of this string is less than the indicated substring of other, a positive value if it is greater than the indicated substring of other, and 0 in case of equality. CHAR_TRAITS::lt is used to compare characters. See Lexicographical Comparisons. Throw out_of_range if lhsPosition > length() or otherPosition > other.length().

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::length().

template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
template<class ALLOC2 >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > (  )  const [inline, inherited]

< Convert this object to a string type native to the compiler's library, instantiated with the same character type and traits type, but not necessarily the same allocator type. The return string will contain the same sequence of characters as orig and will have a default-constructed allocator. Note that this conversion operator can be invoked implicitly (e.g., during argument passing).

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::operator basic_string_view< CHAR_TYPE, CHAR_TRAITS > (  )  const [inherited]

Convert this object to a string_view type instantiated with the same character type and traits type. The return view will contain the same sequence of characters as this object. Note that this conversion operator can be invoked implicitly (e.g., during argument passing).

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::data(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator== ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  lhs,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  rhs 
) [inline]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator== ( const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &  lhs,
const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  rhs 
) [inline]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator== ( const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &  lhs,
const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  rhs 
) [inline]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator== ( const CHAR_TYPE *  lhs,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  rhs 
) [inline]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator== ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  lhs,
const CHAR_TYPE *  rhs 
) [inline]

Return true if the specified lhs string has the same value as the specified rhs string, and false otherwise. Two strings have the same value if they have the same length, and the characters at each respective position have the same value according to CHAR_TRAITS::eq.

References BSLS_ASSERT_SAFE, bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::data(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator!= ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  lhs,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  rhs 
) [inline]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator!= ( const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &  lhs,
const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  rhs 
) [inline]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator!= ( const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &  lhs,
const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  rhs 
) [inline]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator!= ( const CHAR_TYPE *  lhs,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  rhs 
) [inline]

References BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator!= ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  lhs,
const CHAR_TYPE *  rhs 
) [inline]

Return true if the specified lhs string has a different value from the specified rhs string, and false otherwise. Two strings have the same value if they have the same length, and the characters at each respective position have the same value according to CHAR_TRAITS::eq.

References BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator< ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  lhs,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  rhs 
)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator< ( const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &  lhs,
const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  rhs 
)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator< ( const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &  lhs,
const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  rhs 
)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator< ( const CHAR_TYPE *  lhs,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  rhs 
)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator< ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  lhs,
const CHAR_TYPE *  rhs 
)

Return true if the specified lhs string has a lexicographically smaller value than the specified rhs string, and false otherwise. See Lexicographical Comparisons.

References BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator> ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  lhs,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  rhs 
) [inline]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator> ( const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &  lhs,
const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  rhs 
) [inline]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator> ( const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &  lhs,
const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  rhs 
) [inline]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator> ( const CHAR_TYPE *  lhs,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  rhs 
) [inline]

References BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator> ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  lhs,
const CHAR_TYPE *  rhs 
) [inline]

Return true if the specified lhs string has a lexicographically larger value than the specified rhs string, and false otherwise. See Lexicographical Comparisons.

References BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator<= ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  lhs,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  rhs 
) [inline]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator<= ( const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &  lhs,
const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  rhs 
) [inline]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator<= ( const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &  lhs,
const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  rhs 
) [inline]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator<= ( const CHAR_TYPE *  lhs,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  rhs 
) [inline]

References BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator<= ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  lhs,
const CHAR_TYPE *  rhs 
) [inline]

Return true if the specified lhs string has a value lexicographically smaller than or or equal to the specified rhs string, and false otherwise. See Lexicographical Comparisons.

References BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator>= ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  lhs,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  rhs 
) [inline]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator>= ( const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &  lhs,
const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  rhs 
) [inline]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bool bsl::operator>= ( const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &  lhs,
const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  rhs 
) [inline]
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator>= ( const CHAR_TYPE *  lhs,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  rhs 
) [inline]

References BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC >
bool bsl::operator>= ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > &  lhs,
const CHAR_TYPE *  rhs 
) [inline]

Return true if the specified lhs string has a value lexicographically larger than or equal to the specified rhs string, and false otherwise. See Lexicographical Comparisons.

References BSLS_ASSERT_SAFE.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > bsl::operator+ ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  lhs,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  rhs 
)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > bsl::operator+ ( const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &  lhs,
const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  rhs 
)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOC1 , class ALLOC2 >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > bsl::operator+ ( const bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC1 > &  lhs,
const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC2 > &  rhs 
)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > bsl::operator+ ( const CHAR_TYPE *  lhs,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  rhs 
)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > bsl::operator+ ( CHAR_TYPE  lhs,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  rhs 
)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > bsl::operator+ ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  lhs,
const CHAR_TYPE *  rhs 
)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > bsl::operator+ ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  lhs,
CHAR_TYPE  rhs 
)
template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
std::basic_ostream< CHAR_TYPE, CHAR_TRAITS > & bsl::operator<< ( std::basic_ostream< CHAR_TYPE, CHAR_TRAITS > &  os,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  str 
)

< Return the concatenation of strings constructed from the specified lhs and rhs arguments, i.e., basic_string(lhs).append(rhs). The allocator of the returned string is determined per the rules in P1165 (https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1165r1.html). Note that overloads that accept rvalue references are implemented for C++11 and later only. Write the string specified by str into the output stream specified by os, and return os. If the string is shorter than os.width(), then it is padded to os.width() with the current os.fill() character. The padding, if any, is output after the string (on the right) if os.flags() | ios::left is non-zero and before the string otherwise. This function will do nothing unless os.good() is true on entry.

References bslstl_string_fill().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
std::basic_istream< CHAR_TYPE, CHAR_TRAITS > & bsl::operator>> ( std::basic_istream< CHAR_TYPE, CHAR_TRAITS > &  is,
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  str 
)

Replace the contents of the specified str string with a word read from the specified is input stream, and return is. The word begins at the first non-whitespace character on the input stream and ends when another whitespace character (or eof) is found. The trailing whitespace character is left on the input stream. If is.good() is not true on entry or if eof is found before any non-whitespace characters, then str is unchanged and is.fail() is becomes true. If eof is detected after some characters have been read into str, then is.eof() becomes true, but is.fail() does not.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::clear(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::push_back(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::reserve(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
void bsl::swap ( basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  a,
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  b 
) [inline]

Exchange the value of the specified a object with that of the specified b object; also exchange the allocator of a with that of b if the (template parameter) type ALLOCATOR has the propagate_on_container_swap trait, and do not modify either allocator otherwise. This function provides the no-throw exception-safety guarantee. This operation has O[1] complexity if either a was created with the same allocator as b or ALLOCATOR has the propagate_on_container_swap trait; otherwise, it has O[n + m] complexity, where n and m are the lengths of a and b, respectively. Note that this function's support for swapping objects created with different allocators when ALLOCATOR does not have the propagate_on_container_swap trait is a departure from the C++ Standard.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
std::basic_istream< CHAR_TYPE, CHAR_TRAITS > & bsl::getline ( std::basic_istream< CHAR_TYPE, CHAR_TRAITS > &  is,
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  str,
CHAR_TYPE  delim 
)

Replace the contents of the specified str string by extracting characters from the specified is stream until the specified delim character is extracted, and return is. The delim character is removed from the input stream but is not appended to str. If an eof is detected before delim, then the characters up to the eof are put into str and is.eof() becomes true. If is.good() is false on entry, then do nothing, otherwise if no characters are extracted (e.g., because because the stream is at eof), str will become empty and is.fail() will become true.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::clear(), bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::max_size(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::push_back().

Referenced by bsl::getline().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
std::basic_istream< CHAR_TYPE, CHAR_TRAITS > & bsl::getline ( std::basic_istream< CHAR_TYPE, CHAR_TRAITS > &  is,
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  str 
) [inline]

Replace the contents of the specified str string by extracting characters from the specified is stream until a newline character (is.widen(\n) is extracted, and return is. The newline character is removed from the input stream but is not appended to str. If an eof is detected before the newline, then the characters up to the eof are put into str and is.eof() becomes true. If is.good() is false on entry, then do nothing, otherwise if no characters are extracted (e.g., because because the stream is at eof), str will become empty and is.fail() will become true.

References bsl::getline().

int bsl::stoi ( const string &  str,
std::size_t *  pos = 0,
int  base = 10 
)
long bsl::stol ( const string &  str,
std::size_t *  pos = 0,
int  base = 10 
)
unsigned long bsl::stoul ( const string &  str,
std::size_t *  pos = 0,
int  base = 10 
)
long long bsl::stoll ( const string &  str,
std::size_t *  pos = 0,
int  base = 10 
)
unsigned long long bsl::stoull ( const wstring &  str,
std::size_t *  pos = 0,
int  base = 10 
)

Return the value of the specified str by parsing the string and interpreting its content as an integral number. Optionally specify pos whose value is set to the position of the next character in str after the numerical value. Optionally specify base used to change the interpretation of str to a integral number written in the given base. Valid bases are bases in the range of [2,36] and base 0, where base 0 automatically determines the base while parsing the string: the base will be 16 if the number is prefixed with 0x or 0X, base 8 if the number is prefixed with a 0, and base 10 otherwise. The function ignores leading white space characters and interprets as many characters possible to form a valid integral number in the chosen base. If no conversion could be performed, then an invalid_argument exception is thrown. If the value read is out of range of the return type, then an out_of_range exception is thrown. The behavior is undefined unless base is valid. Note that negative numbers are parsed by interpreting the numeric sequence following the - character, and then negating the result, so that stoul and stoull have defined results for negative numbers where the absolute value falls in the valid range for the corresponding signed conversion.

float bsl::stof ( const string &  str,
std::size_t *  pos = 0 
)
double bsl::stod ( const string &  str,
std::size_t *  pos = 0 
)
long double bsl::stold ( const wstring &  str,
std::size_t *  pos = 0 
)

Parses str interpreting its contents as a floating point number. In C++11 if the number in str is prefixed with 0x or 0X the string will be interpreted as a hex number. If there is no leading 0x or 0X the string will be interpreted as a decimal number. Optionally specify pos whose value is set to the position of the next character after the numerical value. The function ignores leading white space characters and interprets as many characters possible to form a valid floating point number. If no conversion could be performed, then an invalid_argument exception is thrown. If the value read is out of range of the return type, then an out_of_range exception is thrown.

string bsl::to_string ( int  value  ) 

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::sprintf(buf, "%d", value) would produce with a sufficiently large buffer.

string bsl::to_string ( long  value  ) 

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::sprintf(buf, "%ld", value) would produce with a sufficiently large buffer.

string bsl::to_string ( long long  value  ) 

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::sprintf(buf, "%lld", value) would produce with a sufficiently large buffer.

string bsl::to_string ( unsigned  value  ) 

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::sprintf(buf, "%u", value) would produce with a sufficiently large buffer.

string bsl::to_string ( unsigned long  value  ) 

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::sprintf(buf, "%lu", value) would produce with a sufficiently large buffer.

string bsl::to_string ( unsigned long long  value  ) 

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::sprintf(buf, "%llu", value) would produce with a sufficiently large buffer.

string bsl::to_string ( float  value  ) 
string bsl::to_string ( double  value  ) 

converts a floating point value to a string with the same contents as what std::sprintf(buf, "%f", value) would produce for a sufficiently large buffer.

string bsl::to_string ( long double  value  ) 

converts a floating point value to a string with the same contents as what std::sprintf(buf, "%Lf", value) would produce for a sufficiently large buffer.

wstring bsl::to_wstring ( int  value  ) 

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::swprintf(buf, L"%d", value) would produce with a sufficiently large buffer.

wstring bsl::to_wstring ( long  value  ) 

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::swprintf(buf, L"%ld", value) would produce with a sufficiently large buffer.

wstring bsl::to_wstring ( long long  value  ) 

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::swprintf(buf, L"%lld", value) would produce with a sufficiently large buffer.

wstring bsl::to_wstring ( unsigned  value  ) 

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::swprintf(buf, L"%u", value) would produce with a sufficiently large buffer.

wstring bsl::to_wstring ( unsigned long  value  ) 

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::swprintf(buf, L"%lu", value) would produce with a sufficiently large buffer.

wstring bsl::to_wstring ( unsigned long long  value  ) 

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::swprintf(buf, L"%llu", value) would produce with a sufficiently large buffer.

wstring bsl::to_wstring ( float  value  ) 
wstring bsl::to_wstring ( double  value  ) 

converts a floating point value to a string with the same contents as what std::sprintf(buf, sz, L"%f", value) would produce for a sufficiently large buffer.

wstring bsl::to_wstring ( long double  value  ) 

converts a floating point value to a string with the same contents as what std::sprintf(buf, sz, L"%Lf", value) would produce for a sufficiently large buffer.

template<class HASHALG , class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
void bsl::hashAppend ( HASHALG &  hashAlg,
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  input 
) [inline]

Pass the specified input string to the specified hashAlg hashing algorithm of the (template parameter) type HASHALG.

References bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::data(), bsl::hashAppend(), and bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE std::size_t bsl::hashBasicString ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  str  ) 

Return a hash value for the specified str.

std::size_t bsl::hashBasicString ( const string &  str  ) 

Return a hash value for the specified str.

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE std::size_t bsl::hash< basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > >::operator() ( const CHAR_TYPE *  input  )  const [inherited]

Compute and return the hash value of the contents of the specified null-terminated input. This value will be the same as the hash value of a basic_string constructed from input.

References BSLS_ASSERT_SAFE, and bsl::hashAppend().

template<class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE std::size_t bsl::hash< basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > >::operator() ( const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &  input  )  const [inherited]

Variable Documentation

template<class CHAR_TYPE, class SIZE_TYPE>
CHAR_TYPE* bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::d_start_p [inherited]
CHAR_TYPE* { ... } ::d_start_p [inherited]

pointer to the data on heap

union { ... } [inherited]

This is the union of the string storage options: it can either be stored inside the short string buffer, d_short, or in the externally allocated memory, pointed to by d_start_p.

See Component bslstl_string

BloombergLP::bsls::AlignedBuffer< { ... } ::d_short [inherited]

short string buffer

template<class CHAR_TYPE, class SIZE_TYPE>
SIZE_TYPE bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::d_length [inherited]
template<class CHAR_TYPE, class SIZE_TYPE>
SIZE_TYPE bsl::String_Imp< CHAR_TYPE, SIZE_TYPE >::d_capacity [inherited]
template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
const basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::size_type bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::npos = ~size_type(0) [static, inherited]
template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::const_iterator bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR >::begin [inline, inherited]

< Exchange the value of this object with that of the specified other object; also exchange the allocator of this object with that of other if the (template parameter) type ALLOCATOR has the propagate_on_container_swap trait, and do not modify either allocator otherwise. This method provides the no-throw exception-safety guarantee. This operation has O[1] complexity if either this object was created with the same allocator as other or ALLOCATOR has the propagate_on_container_swap trait; otherwise, it has O[n + m] complexity, where n and m are the lengths of this object and other, respectively. Note that this method's support for swapping objects created with different allocators when ALLOCATOR does not have the propagate_on_container_swap trait is a departure from the C++ Standard.


Friends

template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
friend class String_ClearProctor< basic_string > [friend, inherited]
template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
string to_string ( int   )  [friend, inherited]

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::sprintf(buf, "%d", value) would produce with a sufficiently large buffer.

template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
string to_string ( long   )  [friend, inherited]

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::sprintf(buf, "%ld", value) would produce with a sufficiently large buffer.

template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
string to_string ( long  long  )  [friend, inherited]

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::sprintf(buf, "%ld", value) would produce with a sufficiently large buffer.

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::sprintf(buf, "%lld", value) would produce with a sufficiently large buffer.

template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
string to_string ( unsigned   )  [friend, inherited]

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::sprintf(buf, "%u", value) would produce with a sufficiently large buffer.

template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
string to_string ( unsigned  long  )  [friend, inherited]

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::sprintf(buf, "%lu", value) would produce with a sufficiently large buffer.

template<class CHAR_TYPE, class CHAR_TRAITS, class ALLOCATOR>
string to_string ( unsigned long  long  )  [friend, inherited]

to_string functions are made friends to allow access to the internal short string buffer.

Constructs a string with contents equal to the specified value. The contents of the string will be the same as what std::sprintf(buf, "%llu", value) would produce with a sufficiently large buffer.