Title: POMO_StringReader::seekto
Published: April 25, 2014
Last modified: May 20, 2026

---

# POMO_StringReader::seekto( int $pos ): int

## In this article

 * [Parameters](https://developer.wordpress.org/reference/classes/pomo_stringreader/seekto/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/classes/pomo_stringreader/seekto/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/classes/pomo_stringreader/seekto/?output_format=md#source)

[ Back to top](https://developer.wordpress.org/reference/classes/pomo_stringreader/seekto/?output_format=md#wp--skip-link--target)

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/pomo_stringreader/seekto/?output_format=md#parameters)󠁿

 `$pos`intrequired

## 󠀁[Return](https://developer.wordpress.org/reference/classes/pomo_stringreader/seekto/?output_format=md#return)󠁿

 int

## 󠀁[Source](https://developer.wordpress.org/reference/classes/pomo_stringreader/seekto/?output_format=md#source)󠁿

    ```php
    public function seekto( $pos ) {
    	$this->_pos = $pos;
    	if ( $this->strlen( $this->_str ) < $this->_pos ) {
    		$this->_pos = $this->strlen( $this->_str );
    	}
    	return $this->_pos;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/pomo/streams.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/pomo/streams.php#L281)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/pomo/streams.php#L281-L287)

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fpomo_stringreader%2Fseekto%2F)
before being able to contribute a note or feedback.