[#BloombergLP-bslstl-StringRefImp-02]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/StringRefImp-0c.adoc[StringRefImp]&lt;char&gt;
:relfileprefix: ../../
:mrdocs:

== Synopsis

Declared in `&lt;bslstl&lowbar;stringref&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;&gt;
class xref:BloombergLP/bslstl/StringRefImp-0c.adoc[StringRefImp]&lt;char&gt;
    : public xref:BloombergLP/bslstl/StringRefData-04.adoc[StringRefData&lt;char&gt;]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bslstl/StringRefData-04.adoc[StringRefData&lt;char&gt;]`
| This class is an intermediate link between `bslstl&colon;&colon;StringRef` used in BDE and `bsl&colon;&colon;string&lowbar;view` and is kept only for compatibility with legacy code&period;
|===

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/StringRefImp-02/const_iterator.adoc[`const&lowbar;iterator`] 
| Alias for a constant iterator over the characters of this ref&period;
| xref:BloombergLP/bslstl/StringRefImp-02/const_reference.adoc[`const&lowbar;reference`] 
| This `typedef` is an alias to `reference`&period;
| xref:BloombergLP/bslstl/StringRefImp-02/const_reverse_iterator.adoc[`const&lowbar;reverse&lowbar;iterator`] 
| This `typedef` is an alias to `bsl&colon;&colon;reverse&lowbar;iterator&lt;const&lowbar;iterator&gt;`&period;
| xref:BloombergLP/bslstl/StringRefImp-02/difference_type.adoc[`difference&lowbar;type`] 
| This `typedef` is an alias to `std&colon;&colon;ptrdiff&lowbar;t`&period;
| xref:BloombergLP/bslstl/StringRefImp-02/iterator.adoc[`iterator`] 
| This `typedef` is an alias to `value&lowbar;type const &ast;`&period;
| xref:BloombergLP/bslstl/StringRefImp-02/reference.adoc[`reference`] 
| This `typedef` is an alias to `value&lowbar;type const&amp;`&period;
| xref:BloombergLP/bslstl/StringRefImp-02/size_type.adoc[`size&lowbar;type`] 
| Standard Library general container requirements&period;
| xref:BloombergLP/bslstl/StringRefImp-02/value_type.adoc[`value&lowbar;type`] 
| Alias for a constant character type stored in this string ref&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/StringRefImp-02/2constructor-00.adoc[`StringRefImp`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bslstl/StringRefImp-02/assign-0785.adoc[`assign`] 
| `assign` overloads
| xref:BloombergLP/bslstl/StringRefImp-02/begin.adoc[`begin`] 
| Return an STL&hyphen;compatible iterator to the first character of the string bound to this string reference or `end()` if the string reference is empty&period; The iterator remains valid as long as this object is valid and is bound to the same string&period;
| xref:BloombergLP/bslstl/StringRefImp-02/compare.adoc[`compare`] 
| Compare this and the specified `other` string objects using a lexicographical comparison and return a negative value if this string is less than `other` string, a positive value if this string is greater than `other` string, and 0 if this string is equal to `other` string&period;
| xref:BloombergLP/bslstl/StringRefImp-02/data.adoc[`data`] 
| Return the address of the first character of the string bound to this string reference such that `&lsqb;data() &period;&period; data()&plus;length())&rsqb;` is a valid half&hyphen;open range of characters&period; Note that the range of characters might not be null&hyphen;terminated and may contain embedded null characters&period;
| xref:BloombergLP/bslstl/StringRefImp-02/empty.adoc[`empty`] 
| Return `true` if this object represents an empty string value, and `false` otherwise&period; This object represents an empty string value if `begin() &equals;&equals; end()`&period; Note that this method is functionally identical with the `isEmpty` method and allows developers to avoid distracting syntax differences when `StringRef` appears in juxtaposition with `string`, which defines `empty` but not `isEmpty`&period;
| xref:BloombergLP/bslstl/StringRefImp-02/end.adoc[`end`] 
| Return an STL&hyphen;compatible iterator one&hyphen;past&hyphen;the&hyphen;last character of the string bound to this string reference or `begin()` if the string reference is empty&period; The iterator remains valid as long as this object is valid and is bound to the same string&period;
| xref:BloombergLP/bslstl/StringRefImp-02/isEmpty.adoc[`isEmpty`] 
| Return `true` if this object represents an empty string value, and `false` otherwise&period; This object represents an empty string value if `begin() &equals;&equals; end()`&period;
| xref:BloombergLP/bslstl/StringRefImp-02/length.adoc[`length`] 
| Return the length of the string referred to by this object&period; Note that this call is equivalent to `end() &hyphen; begin()`&period;
| xref:BloombergLP/bslstl/StringRefImp-02/operator_subs.adoc[`operator&lsqb;&rsqb;`] 
| Return a reference providing a non&hyphen;modifiable access to the character at the specified `index` in the string bound to this reference&period; This reference remains valid as long as the string currently bound to this object remains valid&period; The behavior is undefined unless `0 &lt;&equals; index &lt; length()`&period;
| xref:BloombergLP/bslstl/StringRefImp-02/rbegin.adoc[`rbegin`] 
| Return an STL&hyphen;compatible reverse iterator to the last character of the string bound to this string reference or `rend()` if the string reference is empty&period; The iterator remains valid as long as this object is valid and is bound to the same string&period;
| xref:BloombergLP/bslstl/StringRefImp-02/rend.adoc[`rend`] 
| Return an STL&hyphen;compatible reverse iterator to the prior&hyphen;to&hyphen;the&hyphen;beginning character of the string bound to this string reference or `rbegin()` if the string reference is empty&period; The iterator remains valid as long as this object is valid and is bound to the same string&period;
| xref:BloombergLP/bslstl/StringRefImp-02/reset.adoc[`reset`] 
| Reset this string reference to the default&hyphen;constructed state having an empty `std&colon;&colon;string` value and the following attribute values&colon; &grave; begin() &equals;&equals; end() isEmpty() &equals;&equals; true &grave;
| xref:BloombergLP/bslstl/StringRefImp-02/size.adoc[`size`] 
| Return the number of characters in the string referred to by this object&period; Note that this call is equivalent to `end() &hyphen; begin()`&period;
| xref:BloombergLP/bslstl/StringRefImp-02/2conversion-02.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;StringRefData&lt;char&gt;, is&lowbar;trivially&lowbar;copyable&gt;`] 
| 
| xref:BloombergLP/bslstl/StringRefImp-02/2conversion-06.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;StringRefImp&lt;char&gt;, is&lowbar;trivially&lowbar;copyable&gt;`] 
| Nested trait declaration for `bsl&colon;&colon;is&lowbar;trivially&lowbar;copyable`&period;
| xref:BloombergLP/bslstl/StringRefImp-02/2conversion-04.adoc[`operator std::basic&lowbar;string&lt;char&gt;`] 
| Return an `std&colon;&colon;basic&lowbar;string` (synonymous with `std&colon;&colon;basic&lowbar;string`) having the value of the string bound to this string reference&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslstl/StringRefImp-02/cStringLength.adoc[`cStringLength`] 
| Return the number of `CHAR&lowbar;TYPE` characters in the specified null&hyphen;terminated `data` string, up to but not including the terminal null value&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
