Returns the plural form of the input

@param string $input
@return string
183364
public static function pluralize($input) {
		if (self::$pluralizer === null) {
			self::$pluralizer = new StandardEnglishSingularizer();
		}

		return self::$pluralizer->getPluralForm($input);
	}
552091
public static function plural(string $word) : string
    {
        // Check that `$word` is countable.
        if(in_array($word, Inflector::$_uncontable)) {
            return $word;
        }

        // Now check that `$word` is regular.
        if(isset(Inflector::$_plural["irregular"][$word])) {
            return Inflector::$_plural["irregular"][$word];
        }

        // Now check that `$word` can be pluralize.
        foreach(Inflector::$_plural["uninflected"] as $rule) {
            if(preg_match("/^". $rule ."$/", $word)) {
                return $word;
            }
        }

        // Now the word follows a rule, so apply it
        foreach(Inflector::$_plural["rules"] as $key => $value) {
            if(preg_match($key, $word)) {
                return preg_replace($key, $value, $word);
            }
        }

        // Well, right now the word couldn't be pluralized
        // so return it as it was (or throw an exception?)
        return $word;
    }
245216
public static function pluralize( $string ) {

        if ( isset( self::$plural[ $string ] ) )
            return self::$plural[ $string ];

        if ( substr( $string, -1 , 1 ) == 'y' )
            return substr( $string , 0 , strlen( $string ) - 1 ) . 'ies';
        elseif ( substr( $string , -1 , 1 ) != 's' )
            return $string . 's';

        return $string;

    }
1160810
public static function plural($word)
    {
        if(is_array($word)) {
            $ret = [];
            foreach($word as $key => $value) {
                $ret[$key] = Str::plural($value);
            }

            return $ret;
        }

        return Inflector::plural($word);
    }
565627
public static function encode($input)
    {
        $parts = explode('.', $input);

        foreach ($parts as &$part) {
            $part = static::encodePart($part);
        }

        return implode('.', $parts);
    }
895281
public function convertFromPositive($input)
    {
        $matches = [];

        if (
            !preg_match(
                '
                /^0*(?<carets>\\^*)(?<alpha>[A-Z]*)(?<year>\d+)$/',
                $input,
                $matches
            )
        ) {
            return null;
        }

        if ($matches['alpha'] === '') {
            return $matches['year'];
        }

        if ($matches['carets'] === '') {
            $expectedLength = ord($matches['alpha']) - static::ORD_START + 5;
        } else {
            $len = strlen($matches['carets']);

            $expectedLength = 0;

            for ($i=0; $i < $len; $i++) {
                $expectedLength = $expectedLength * 26;
                $expectedLength += ord($matches['alpha'][$i]) - static::ORD_START;
                $expectedLength++;
            }

            $expectedLength += 30;
        }

        return str_pad($matches['year'], $expectedLength, '0', STR_PAD_RIGHT);
    }
540192
public function genSalt($input = null)
    {
        if (!$input) {
            $input = $this->_getRandomBytes(6);
        }

        $identifier = 'sha1';
        $salt = $this->_encode64($input, 6);

        return '$' . $identifier . '$' . $this->_iterationCount . '$' . $salt . '$';
    }
827281
public static function pluralize(string $word): string
	{
		if (isset(static::$_cache['pluralize'][$word])) {
			return static::$_cache['pluralize'][$word];
		}

		if (!isset(static::$_cache['irregular']['pluralize'])) {
			static::$_cache['irregular']['pluralize'] = '(?:' . \implode('|', \array_keys(static::$_irregular)) . ')';
		}

		if (\preg_match('/(.*?(?:\\b|_))(' . static::$_cache['irregular']['pluralize'] . ')$/i', $word, $regs)) {
			static::$_cache['pluralize'][$word] = $regs[1] . $regs[2][0] .
				\substr(static::$_irregular[\strtolower($regs[2])], 1);

			return static::$_cache['pluralize'][$word];
		}

		if (!isset(static::$_cache['uninflected'])) {
			static::$_cache['uninflected'] = '(?:' . \implode('|', static::$_uninflected) . ')';
		}

		if (\preg_match('/^(' . static::$_cache['uninflected'] . ')$/i', $word, $regs)) {
			static::$_cache['pluralize'][$word] = $word;

			return $word;
		}

		foreach (static::$_plural as $rule => $replacement) {
			if (\preg_match($rule, $word)) {
				static::$_cache['pluralize'][$word] = \preg_replace($rule, $replacement, $word);

				return static::$_cache['pluralize'][$word];
			}
		}

		return $word;
	}
53186
public function convertFromNegative($input)
    {
        if (strpos('/*', $input[0]) !== false) {
            $input = substr($input, 1);
        }

        $input = strtr($input, static::NEGATIVE_CHARS, static::POSITIVE_CHARS);

        $res = $this->convertFromPositive($input);

        if (preg_match('/^0+$/', $res)) {
            return $res;
        }

        return '-' . $res;
    }
1129205
public static function pluralise( $string ) {

		// save some time in the case that singular and plural are the same
		if ( in_array( mb_strtolower( $string ), self::$uncountable ) )
			return $string;


		// check for irregular singular forms
		foreach ( self::$irregular as $pattern => $result )
		{
			$pattern = '/' . $pattern . '$/iu';

			if ( preg_match( $pattern, $string ) )
				return preg_replace( $pattern, $result, $string);
		}

		// check for matches using regular expressions
		foreach ( self::$plural as $pattern => $result )
		{
			if ( preg_match( $pattern, $string ) )
				return preg_replace( $pattern, $result, $string );
		}

		return $string;

	}
795348
public static function plural($string)
    {
        $result = $string;
        foreach (self::$_plural as $rule => $replacement) {
            $rule = self::_normalize($rule);
            if (preg_match($rule, $string)) {
                $result = preg_replace($rule, $replacement, $string);
                break;
            }
        }
        return $result;
    }
1096960
public function removeEmptyInput($input)
    {
        $filterableInput = [];

        foreach ($input as $key => $val) {
            if ($val !== '' && $val !== null) {
                $filterableInput[$key] = $val;
            }
        }

        return $filterableInput;
    }
15096
public static function pluralize($string) {
        $g11n = G11n::registry();

        if (!$g11n->isEnabled()) {
            return $string;
        }

        return static::cache([__METHOD__, $string], function() use ($string, $g11n) {
            $string = mb_strtolower($string);
            $result = null;
            $inflections = $g11n->current()->getInflectionRules();

            if (!$inflections) {
                return $string;

            } else if (!empty($inflections['uninflected']) && in_array($string, $inflections['uninflected'])) {
                $result = $string;

            } else if (!empty($inflections['irregular']) && isset($inflections['irregular'][$string])) {
                $result = $inflections['irregular'][$string];

            } else if (!empty($inflections['irregular']) && in_array($string, $inflections['irregular'])) {
                $result = $string;

            } else if (!empty($inflections['plural'])) {
                foreach ($inflections['plural'] as $pattern => $replacement) {
                    if (preg_match($pattern, $string)) {
                        $result = preg_replace($pattern, $replacement, $string);
                        break;
                    }
                }
            }

            if (empty($result)) {
                $result = $string;
            }

            return $result;
        });
    }
745580
public static function escapeInput(string $input): string
    {
        $escaped_input = htmlspecialchars(stripslashes(trim($input)));
        return $escaped_input;
    }
244997
public static function className($input): string
    {
        $output = preg_replace(['#(?<=[^A-Z\s])([A-Z\s])#i'], ' $0', $input);
        $output = explode(' ', $output);

        $output = array_map(function ($item) {
            $item = preg_replace('#[^a-z0-9]#i', '', $item);
            $item = Filter::ucFirst($item);
            return $item;
        }, $output);

        $output = array_filter($output);

        return implode('', $output);
    }
1331220
public static function pluralize($word)
    {
        $lowerCasedWord = strtolower($word);
        foreach (static::$uncountables as $uncountable) {
            if (substr($lowerCasedWord, (-1 * strlen($uncountable))) == $uncountable) {
                return $word;
            }
        }
        foreach (static::$irregulars as $plural => $singular) {
            if (preg_match('/(' . $plural . ')$/i', $word, $arr)) {
                return preg_replace(
                    '/(' . $plural . ')$/i',
                    substr($arr[0], 0, 1) . substr($singular, 1),
                    $word
                );
            }
        }
        foreach (static::$plurals as $rule => $replacement) {
            if (preg_match($rule, $word)) {
                return preg_replace($rule, $replacement, $word);
            }
        }

        return false;
    }
673504
public function fixName($input)
    {
        if (!preg_match("/^([a-z]|[A-Z])+.*$/", $input)) {
            $input = "q_" . $input;
        }
        $input = str_replace(array(" ", "-", ":", ";", "!", "/", "\\", "'"), array("_", "_hyph_", "_dd_", "_dc_", "_excl_", "_fs_", "_bs_", '_qu_'), $input);
        return $input;
    }