[#bsl-basic_stringbuf-xsgetn-09]
= xref:bsl.adoc[bsl]::xref:bsl/basic_stringbuf.adoc[basic&lowbar;stringbuf]::xsgetn
:relfileprefix: ../../
:mrdocs:

`xsgetn` overloads

== Synopses

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

Multiple character extraction&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
streamsize
xref:bsl/basic_stringbuf/xsgetn-0f.adoc[xsgetn](
    char&lowbar;type* &lowbar;&lowbar;s,
    streamsize &lowbar;&lowbar;n);
----

[.small]#xref:bsl/basic_stringbuf/xsgetn-0f.adoc[_» more&period;&period;&period;_]#

Read up to the specified `numCharacters` from this `stringbuf` object and store them in the specified `result` array&period; Return the number of characters loaded into `result`&period; Note that if fewer than `numCharacters` characters are available in the buffer, all available characters are loaded into `result`&period; The behavior is undefined unless `result` refers to a contiguous sequence of at least `numCharacters` characters&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
std::streamsize
xref:bsl/basic_stringbuf/xsgetn-01.adoc[xsgetn](
    xref:bsl/basic_stringbuf/char_type.adoc[char&lowbar;type]* result,
    std::streamsize numCharacters);
----

[.small]#xref:bsl/basic_stringbuf/xsgetn-01.adoc[_» more&period;&period;&period;_]#

== Return Value

The number of characters assigned&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *&lowbar;&lowbar;s*
| A buffer area&period;
| *&lowbar;&lowbar;n*
| Maximum number of characters to assign&period;
|===


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