Возвращает слово во множестевенном/единственном числе на основании $n

@param int         $n
@param string      $one
@param null|string $two
@param null|string $five

@return string
162465
public static function plural($n, $one, $two = NULL, $five = NULL)
	{
		if (is_array($one)) {
			$values = [Kohana_Arr::get($one, 0)];
			$values[1] = Kohana_Arr::get($one, 1, $values[0]);
			$values[2] = Kohana_Arr::get($one, 2, $values[1]);
		} else {
			$values = [$one];
			$values[1] = NULL !== $two ? $two : $one;
			$values[2] = NULL !== $five ? $five : $values[1];
		}

		$idx = $n % 10 == 1 && $n % 100 != 11
			? 0
			: ($n % 10 >= 2 && $n % 10 <= 4 && ($n % 100 < 10 || $n % 100 >= 20)
				? 1
				: 2
			);

		return $values[$idx];
	}
1187033
public function skip($n)
    {
        $start = $this->currentPosition;

        $ret = @fseek($this->stream, $n, SEEK_CUR);
        if ($ret === -1) {
            return -1;
        }

        $this->currentPosition = ftell($this->stream);

        if ($start > $this->currentPosition) {
            $skipped = $start - $this->currentPosition;
        } else {
            $skipped = $this->currentPosition - $start;
        }

        return $skipped;
    }
838983
protected function binom($n, $k)
    {
        $j = $res = 1;

        if ($k < 0 || $k > $n) {
            return 0;
        }
        if (($n - $k) < $k) {
            $k = $n - $k;
        }
        while ($j <= $k) {
            $res *= $n--;
            $res /= $j++;
        }

        return $res;
    }
1070509
public function skip(int $n) : int
    {
        if ($n <= 0) {
            return 0;
        }

        $skipped = 0;
        $skipLimit = min(self::MAX_SKIP_BUFFER_SIZE, $n);
        while ($skipped < $n) {
            $buf = $this->read(min($skipLimit, $n - $skipped));
            if ($buf === null) {
                break;
            }
            $skipped += strlen($buf);
        }
        return $skipped;
    }
89842
public static function invertBits($n){
		$bits = \floor(\log($n, 2)) + 1;
		$mask = (1 << $bits) - 1;
		return $n ^ $mask;
	}
518606
public function pickRandom($n)
	{
		$rows = $this->rows;

		shuffle($rows);
		$randomRows = array_slice($rows, 0, $n);
		$rowsObject = new self($randomRows);

		return $rowsObject;
	}
575903
public function getParent($n = null)
	{
		return ($n > 1) ? $this->parent->getParent(--$n) : $this->parent;
	}
970338
private function fromZigZag($n)
    {
        if (PHP_INT_SIZE === 4) {
            $n = gmp_init($n, 10);
        }
        $result = ($n >> 1) ^ -($n & 1);
        if (PHP_INT_SIZE === 4) {
            $result = gmp_strval($result, 10);
        }

        return $result;
    }
142024
public function zeroNumber($number = 0, $length = 5)
    {
        $no = '';
        if (strlen($number) < $length) {
            for ($i = strlen($number); $i < $length; $i++) {
                $no .= '0';
            }
        }

        $no .= $number;
        return $no;
    }
43313
public static function bytes($n, &$method = null)
    {
        $bytes = self::php7Bytes($n);
        $method = 'php7';
        if (! isset($bytes)) {
            $bytes = self::mcryptBytes($n);
            $method = 'mcrypt';
        }
        if (! isset($bytes)) {
            $bytes = self::opensslBytes($n);
            $method = 'openssl';
        }
        if (! isset($bytes)) {
            $bytes = self::urandomBytes($n);
            $method = 'urandom';
        }
        if (! isset($bytes)) {
            $bytes = self::mtRandBytes($n);
            $method = 'mt_rand';
        }
        $l = Binary::length($bytes);
        if ($l < $n) {
            $bytes .= self::mtRandBytes($n - $l);
        }
        return $bytes;
    }
832039
public function substr($o, $n = -1)
    {
        if (!isset($this->bev)) {
            return false;
        }
        return $this->bev->input->substr($o, $n);
    }
652431
public function look($n, $o = 0)
    {
        if ($this->length <= $o) {
            return '';
        }
        return $this->substr($o, $n);
    }
1291668
public function addField($n, $defaults = [])
    {
        if ($defaults && !is_array($defaults)) {
            $defaults = [$defaults];
        }
        $defaults['join'] = $this;

        return $this->owner->addField($this->prefix.$n, $defaults);
    }
397376
public function topN(int $n): self
    {
        if (!$this->isSorted) {
            usort($this->list, [$this, 'compare']);
            $this->isSorted = true;
        }

        $topNList = new self();
        $topNList->insertFromArray(array_slice($this->list, -$n, $n));

        return $topNList;
    }
643398
protected function num($n)
    {
        if (!is_numeric($n)) {
            return $n;
        }
        $broken_number = explode('.', (string)$n);
        if (isset($broken_number[1])) {
            return number_format($broken_number[0], 0, ',', '.').','.$broken_number[1];
        }
        return number_format($broken_number[0], 0, ',', '.');
    }
542959
public function setNum(int $n): void
    {
        $this->num     = $n;
        $this->numText = $n . ' ';
    }
968530
public function txts($string, $n)
	{
		$args  = func_get_args();
		$count = count($args);

		if ($count > 1)
		{
			// Try the key from the language plural potential suffixes
			$found = false;
			$suffixes = $this->getPluralSuffixes((int) $n);
			array_unshift($suffixes, (int) $n);
			foreach ($suffixes as $suffix)
			{
				$key = $string . '_' . $suffix;
				if ($this->hasKey($key))
				{
					$found = true;
					break;
				}
			}
			if (!$found)
			{
				// Not found so revert to the original.
				$key = $string;
			}
			if (is_array($args[$count - 1]))
			{
				$args[0] = $this->translate(
					$key, array_key_exists('jsSafe', $args[$count - 1]) ? $args[$count - 1]['jsSafe'] : false,
					array_key_exists('interpretBackSlashes', $args[$count - 1]) ? $args[$count - 1]['interpretBackSlashes'] : true
				);
			}
			else
			{
				$args[0] = $this->translate($key);
			}
			return call_user_func_array('sprintf', $args);
		}
		elseif ($count > 0)
		{

			// Default to the normal sprintf handling.
			$args[0] = $this->translate($string);
			return call_user_func_array('sprintf', $args);
		}

		return '';
	}