BloombergLP::bslstl::StringRefImp<wchar_t>::StringRefImp

Constructors

Synopses

Declared in <bslstl_stringref.h>

Create an object representing an empty std::string value that is independent of any external representation and with the following attribute values: ` begin() == end() isEmpty() == true `

StringRefImp();
» more...

Create a string ref referencing the specified bsl::basic_string.

StringRefImp(bsl::basic_string<wchar_t> const& str);
» more...

Create a string ref referencing the specified std::pmr::basic_string.

StringRefImp(std::pmr::basic_string<wchar_t> const& str);
» more...

Create a string ref referencing the specified std::basic_string.

StringRefImp(std::basic_string<wchar_t> const& str);
» more...

Create a string-reference object having a valid std::string value, whose external representation is defined by the specified str object. The external representation must remain valid as long as it is bound to this string reference.

StringRefImp(bsl::basic_string_view<wchar_t> const& str);
» more...

Create a string-reference object having a valid std::string value, whose external representation begins at the specified data address and extends for std::char_traits<CHAR_TYPE>::length(data) characters. The external representation must remain valid as long as it is bound to this string reference. The behavior is undefined unless data is null-terminated.

StringRefImp(wchar_t const* data);
» more...

Create a string-reference object having a valid std::string value, whose external representation begins at the specified begin iterator and extends up to, but not including, the specified end iterator. The external representation must remain valid as long as it is bound to this string reference. The behavior is undefined unless begin <= end. Note that, like an std::string, the string need not be null-terminated and may contain embedded null characters.

StringRefImp(
    const_iterator begin,
    const_iterator end);
» more...

Create a string-reference object having a valid std::string value, whose external representation begins at the specified data address and extends for the specified length characters.

StringRefImp(
    wchar_t const* data,
    size_type length);
» more...

Create a string-reference object having a valid std::string value, whose external representation begins at the specified data address and extends for the specified length. The external representation must remain valid as long as it is bound to this string reference. Passing 0 has the same effect as default construction. The behavior is undefined unless 0 <= length and, if 0 == data, then 0 == length. Note that, like an std::string, the data need not be null-terminated and may contain embedded null characters. Note that the template and non-template versions combine to allow various integral and enumeration types to be used for length while preventing (char *, 0) initializer arguments from matching the two-iterator constructor below.

template<class INT_TYPE>
StringRefImp(
    wchar_t const* data,
    INT_TYPE length)
requires bsl::is_integral<INT_TYPE>::value;
» more...

Create a string-reference object having a valid std::string value, whose external representation begins at the specified startIndex in the specified original string reference, and extends either the specified numCharacters or until the end of the original string reference, whichever comes first. The external representation must remain valid as long as it is bound to this string reference. The behavior is undefined unless startIndex <= original.length(). Note that if startIndex is original.length() an empty string reference is returned.

StringRefImp(
    StringRefImp<wchar_t> const& original,
    size_type startIndex,
    size_type numCharacters);
» more...