Constructors
Synopses
Declared in <bslstl_stringref.h>
Create an empty string reference.
StringRefImp();
Create a string ref referencing the specified bsl::basic_string.
StringRefImp(bsl::basic_string<CHAR_TYPE> const& str);
Create a string ref referencing the specified std::pmr::basic_string.
StringRefImp(std::pmr::basic_string<CHAR_TYPE> const& str);
Create a string ref referencing the specified std::basic_string.
StringRefImp(std::basic_string<CHAR_TYPE> const& str);
Create a string reference to external character data.
StringRefImp(bsl::basic_string_view<CHAR_TYPE> const& str);
Create a string reference to a null‐terminated C string.
StringRefImp(CHAR_TYPE const* data);
Create a string reference to an iterator range.
StringRefImp(
const_iterator begin,
const_iterator end);
Create a string reference to external character data.
StringRefImp(
CHAR_TYPE const* data,
size_type length);
Create a string reference to external character data.
template<class INT_TYPE>
StringRefImp(
CHAR_TYPE const* data,
INT_TYPE length)
requires bsl::is_integral<INT_TYPE>::value;
Create a string reference to a substring.
StringRefImp(
StringRefImp const& original,
size_type startIndex,
size_type numCharacters);
Parameters
Name |
Description |
str |
string whose contents are referenced |
data |
null‐terminated character string to reference |
begin |
the start of the external representation |
end |
one past the end of the external representation |
length |
number of characters in the referenced sequence |
original |
string reference providing the external data |
startIndex |
starting index within |
numCharacters |
maximum number of characters to reference |
Created with MrDocs