[#bsl-basic_stringbuf-xsgetn-01] = xref:bsl.adoc[bsl]::xref:bsl/basic_stringbuf.adoc[basic_stringbuf]::xsgetn :relfileprefix: ../../ :mrdocs: 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. == 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); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#