[#bsl-basic_syncbuf-xsgetn]
= xref:bsl.adoc[bsl]::xref:bsl/basic_syncbuf.adoc[basic&lowbar;syncbuf]::xsgetn
:relfileprefix: ../../
:mrdocs:

Multiple character extraction&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
streamsize
xsgetn(
    char&lowbar;type* &lowbar;&lowbar;s,
    streamsize &lowbar;&lowbar;n);
----

== Description

Fills _&lowbar;&lowbar;s&lsqb;0&rsqb;_ through _&lowbar;&lowbar;s&lsqb;&rsqb;_ with characters from the input sequence, as if by `sbumpc()&period;` Stops when either _&lowbar;&lowbar;n_ characters have been copied, or when `traits&colon;&colon;eof()` would be copied&period;

It is expected that derived classes provide a more efficient implementation by overriding this definition&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]#
