Quick Links:

bal | bbl | bdl | bsl

Classes | Namespaces | Defines | Typedefs | Enumerations | Functions

bslstl_string.h File Reference

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

Go to the source code of this file.

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 > >
struct  bslalg::HasStlIterators< bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > >
struct  bslma::UsesBslmaAllocator< bsl::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOC > >

Namespaces

namespace  bsl
namespace  bslh
namespace  bslalg
namespace  bslma

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

Enumerations

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

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)
template<class HASHALG , class CHAR_TYPE , class CHAR_TRAITS , class ALLOCATOR >
BSLS_PLATFORM_AGGRESSIVE_INLINE
void 
bslh::hashAppend (HASHALG &hashAlg, const std::basic_string< CHAR_TYPE, CHAR_TRAITS, ALLOCATOR > &input)
template<class CHAR_TYPE , class CHAR_TRAITS >
bool bslstl_string_fill (std::basic_ostream< CHAR_TYPE, CHAR_TRAITS > &os, std::basic_streambuf< CHAR_TYPE, CHAR_TRAITS > *buf, std::size_t n)

Detailed Description


Function Documentation

template<class CHAR_TYPE , class CHAR_TRAITS >
bool bslstl_string_fill ( std::basic_ostream< CHAR_TYPE, CHAR_TRAITS > &  os,
std::basic_streambuf< CHAR_TYPE, CHAR_TRAITS > *  buf,
std::size_t  n 
)
Parameters:
n Do not use, for internal use by operator<< only.

References BSLS_ASSERT_SAFE.

Referenced by bsl::operator<<().