[#bsl-basic_string-0f3-substr-06]
= xref:bsl.adoc[bsl]::xref:bsl/basic_string-0f3.adoc[basic&lowbar;string&lt;char32&lowbar;t&gt;]::substr
:relfileprefix: ../../
:mrdocs:

`substr` overloads

== Synopses

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

Return a substring of this string as a const lvalue&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;char32&lowbar;t&gt;]
xref:bsl/basic_string-0f3/substr-00.adoc[substr](
    xref:bsl/basic_string-0f3/size_type.adoc[size&lowbar;type] position = 0,
    xref:bsl/basic_string-0f3/size_type.adoc[size&lowbar;type] numChars = npos) const &amp;;
----

[.small]#xref:bsl/basic_string-0f3/substr-00.adoc[_» more&period;&period;&period;_]#

Return a substring of this string as an rvalue&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;char32&lowbar;t&gt;]
xref:bsl/basic_string-0f3/substr-0e.adoc[substr](
    xref:bsl/basic_string-0f3/size_type.adoc[size&lowbar;type] position = 0,
    xref:bsl/basic_string-0f3/size_type.adoc[size&lowbar;type] numChars = npos) &amp;&amp;;
----

[.small]#xref:bsl/basic_string-0f3/substr-0e.adoc[_» more&period;&period;&period;_]#


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