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

Set the current input position or the current output position (or both) to the specified `offset` from the specified `whence` location&period; Optionally specify a `modeBitMask` indicating whether to set the current input position, current output position, or both&period; If `whence` is `ios&lowbar;base&colon;&colon;beg`, set the current position to the indicated `offset` from the beginning of the stream&semi; if `whence` is `ios&lowbar;base&colon;&colon;end`, set the current position to the indicated `offset` from the end of the stream&semi; and if `whence` is `ios&lowbar;base&colon;&colon;cur`, set the current input or output position to the indicated `offset` from its current position&period; If `whence` is `ios&lowbar;base&colon;&colon;cur`, then `modeBitMask` may be either `ios&lowbar;base&colon;&colon;in` or `ios&lowbar;base&colon;&colon;out`, but not both&period; Return the offset of the new position on success, and `pos&lowbar;type(off&lowbar;type(&hyphen;1))` otherwise&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
xref:bsl/basic_stringbuf/pos_type.adoc[basic&lowbar;stringbuf&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS, ALLOCATOR&gt;::pos&lowbar;type]
seekoff(
    xref:bsl/basic_stringbuf/off_type.adoc[off&lowbar;type] offset,
    std::ios&lowbar;base::seekdir whence,
    std::ios&lowbar;base::openmode modeBitMask = ios&lowbar;base&colon;&colon;in &verbar; ios&lowbar;base&colon;&colon;out);
----


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