[#bsl-basic_stringbuf-seekpos-00] = xref:bsl.adoc[bsl]::xref:bsl/basic_stringbuf.adoc[basic_stringbuf]::seekpos :relfileprefix: ../../ :mrdocs: Set the current stream position. == Synopsis Declared in `<bslstl_stringbuf.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- virtual xref:bsl/basic_stringbuf/pos_type.adoc[basic_stringbuf<CHAR_TYPE, CHAR_TRAITS, ALLOCATOR>::pos_type] seekpos( xref:bsl/basic_stringbuf/pos_type.adoc[pos_type] absoluteOffset, std::ios_base::openmode modeBitMask = ios_base::in | ios_base::out); ---- == Description Set the current input position or the current output position (or both) to the specified `absoluteOffset` from the beginning of the stream. Optionally specify a `modeBitMask` indicating whether to set the current input position, current output position, or both. Return the offset of the new position on success, and `pos_type(off_type(‐1))` otherwise. == Return Value offset of the new position, or `pos_type(off_type(‐1))` on failure == Parameters [cols="1,4"] |=== | Name| Description | *absoluteOffset* | absolute position from the beginning of the stream | *modeBitMask* | whether to adjust the input position, output position, or both |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#