POMO_Reader::substr() WordPress Method

The POMO_Reader::substr() WordPress method is used to get a part of a string. It is similar to the substr() function in PHP, except that it takes into account the UTF-8 encoding of the string.

POMO_Reader::substr( string $string, int $start, int $length ) #


Parameters

$string

(string)(Required)

$start

(int)(Required)

$length

(int)(Required)


Top ↑

Return

(string)


Top ↑

Source

File: wp-includes/pomo/streams.php

		public function substr( $string, $start, $length ) {
			if ( $this->is_overloaded ) {
				return mb_substr( $string, $start, $length, 'ascii' );
			} else {
				return substr( $string, $start, $length );
			}
		}

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.