Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

StringIO#seek

(::Integer amount, ?::Integer whence) -> ::Integer
seek(offset, whence = SEEK_SET) → 0

Sets the position to the given integer offset (in bytes), with respect to a given constant whence; see IO#seek.