Lines Matching defs:length
82 foreach ($lengths as $length) {
83 if (self::isLastPart($length, $flags, $limit, $count)) {
88 if (self::isPart($length, $flags)) {
89 $parts[] = self::makePart($string, $position, $length[0], $offset_capture);
92 $position += $length[0];
99 * @param $length
105 private static function isLastPart($length, $flags, $limit, &$count)
107 $split_empty = !($flags & PREG_SPLIT_NO_EMPTY) || $length[0];
108 $is_delimiter = $length[1];
117 * @param $length
121 private static function isPart($length, $flags)
123 $split_empty = !($flags & PREG_SPLIT_NO_EMPTY) || $length[0];
124 $is_delimiter = $length[1];
125 $is_captured = ($flags & PREG_SPLIT_DELIM_CAPTURE) && $length[2];
136 * @param integer|null $length
140 private static function makePart($string, $position, $length = null, $offset_capture = false)
142 $cut = mb_strcut($string, $position, $length);
151 * [ 0 => length, 1 => is_delimiter?, 2 =>