Lines Matching refs:length
76 * @param int $length (optional) length in UTF-8 characters from offset
82 public static function substr($str, $offset, $length = null) argument
85 if ($length === null) {
89 return mb_substr($str, $offset, $length);
109 if ($length !== null) $length = (int)$length;
112 if ($length === 0) return '';
113 if ($offset < 0 && $length < 0 && $length < $offset) return '';
137 if ($length === null) {
143 if ($length > 0) {
145 $length = min($strlen - $offset, $length);
146 $Lx = (int)($length / 65535);
147 $Ly = $length % 65535;
151 } elseif ($length < 0) {
152 if ($length < ($offset - $strlen)) return '';
153 $Lx = (int)((-$length) / 65535);
154 $Ly = (-$length) % 65535;
173 …* @param int $length If given and is positive, it represents the length of the portion of string w…
181 public static function substr_replace($string, $replacement, $start, $length = 0) argument
186 $ret .= self::substr($string, $start + $length);
357 $length = null;
359 while ($length === null || $length < $offset) {
365 $length = self::strlen(substr($haystack, 0, $pos));
367 if ($length < $offset)
368 $comp = $pos - $length;
371 return $length;