POMO_StringReader::read() WordPress Method

The read() method in the POMO_StringReader class reads a string from a given file. The string is read from the current position in the file. If the current position is at the end of the file, an empty string is returned.

POMO_StringReader::read( string $bytes ) #


Parameters

$bytes

(string)(Required)


Top ↑

Return

(string)


Top ↑

Source

File: wp-includes/pomo/streams.php

		public function read( $bytes ) {
			$data        = $this->substr( $this->_str, $this->_pos, $bytes );
			$this->_pos += $bytes;
			if ( $this->strlen( $this->_str ) < $this->_pos ) {
				$this->_pos = $this->strlen( $this->_str );
			}
			return $data;
		}

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.