[#bsl-basic_stringbuf-xsgetn-01] = xref:bsl.adoc[bsl]::xref:bsl/basic_stringbuf.adoc[basic_stringbuf]::xsgetn :relfileprefix: ../../ :mrdocs: Read characters from the input sequence. == Synopsis Declared in `<bslstl_stringbuf.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- virtual std::streamsize xsgetn( xref:bsl/basic_stringbuf/char_type.adoc[char_type]* result, std::streamsize numCharacters); ---- == Description Read up to the specified `numCharacters` from this `stringbuf` object and store them in the specified `result` array. Return the number of characters loaded into `result`. Note that if fewer than `numCharacters` characters are available in the buffer, all available characters are loaded into `result`. The behavior is undefined unless `result` refers to a contiguous sequence of at least `numCharacters` characters. == Return Value number of characters loaded into `result` == Parameters [cols="1,4"] |=== | Name| Description | *result* | destination array for characters read from the buffer | *numCharacters* | maximum number of characters to read |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#