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

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

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;char32&lowbar;t&gt;]
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]#Created with https://www.mrdocs.com[MrDocs]#
