@param null $string

@return string
19181
public static function classify($string = null)
    {
        return implode(array_map(function ($word) {
            return ucfirst(strtolower($word));
        }, explode(static::SEPARATOR_UNDERSCORE, static::clear(static::underscore($string)))));
    }
973185
public static function underscore($string = null)
    {
        return implode(static::SEPARATOR_UNDERSCORE, array_map(function ($word) {
            return strtolower($word);
        }, preg_split('/([A-Z]*[^A-Z]+)/', static::clear($string), -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY)));
    }
932937
public function string($str = null)
    {
        if ($str !== null) {
            foreach ($this->childScanners as $s) {
                $s->string($str);
            }
        }
        return parent::string($str);
    }
813594
private function encodeString($data = null)
    {
        $data = is_null($data) ? $this->data : $data;
        return sprintf("%d:%s", strlen($data), $data);
    }
414678
public function prepare(string $string): string
    {
        foreach ($this->_steps as $step) {
            $string = $step->apply($string);
        }
        return $string;
    }
289487
public function replaceWithVariables($string)
    {
        $matches = null;
        $matcher = preg_match_all($this->regex, $string, $matches);

        $original = $matches[0];
        $vars     = $matches[1];

        foreach ($vars as $key => $variable) {
            if ($attribute = $this->getAttribute($variable)) {
                $string = str_replace($original[$key], $attribute, $string);
            }
        }

        return $string;
    }
416634
public static function url($string) {

        if(null === $string) {
            return '';
        }

    	if(true === is_numeric($string)) {
    		return $string;
    	}

    	if(false === is_string($string)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($string)), E_USER_ERROR);
		}

        return rawurlencode($string);
    }
310008
protected function inflect($string)
    {
        if (null === $this->inflector) {
            return $string;
        }

        return call_user_func($this->inflector, $string);
    }
953573
public function fwrite($string, $length = null)
    {
        return fwrite($this->handle, $string, (is_null($length) ? strlen($string) : $length));
    }
737656
protected function toTokens(string $string = null): array
    {
        if (null === $string) {
            $string = $this->getBodyAsString();
        }

        $tokens = [];
        // Generate atoms; split at all invisible boundaries followed by WSP
        foreach (preg_split('~(?=[ \t])~', $string) as $token) {
            $newTokens = $this->generateTokenLines($token);
            foreach ($newTokens as $newToken) {
                $tokens[] = $newToken;
            }
        }

        return $tokens;
    }
835991
public static function likeEmpty(?string $string = null): bool
    {
        return $string === null || $string === '' || $string === false;
    }
767735
protected function escape(string $string): string
	{
		if($this->formatter !== null)
		{
			return $this->formatter->escape($string);
		}

		return $string;
	}
914139
public function escape($string, $charset=null) {

        if (\is_null($charset)){
            $charset = $this['charset'];
        }

        return \htmlspecialchars($string, \ENT_QUOTES, $charset);
    }
1301868
public function quote ($string)
		{
			if (is_null($string)) {
				return 'NULL';

			} else if (is_int($string) || is_float($string)) {
				return $string;

			} else if ($string instanceof Raw || $string instanceof DatabaseQuery) {
				return (string) $string;

			} else {
				return $this->database->quote($string);
			}
		}
371816
public function stringToDateTime($string)
	{
		$date = date_create($string);
		$errors = \DateTime::getLastErrors();

		if ($errors['warning_count'] > 0 || $errors['error_count'] > 0)
			return null;

		return new DateTime($date->format(static::$dateTimeFormat));
	}
953479
public function hash($string, $key = null)
    {

        $publicKey = is_null($key) ? $this->generateKey($string) : $key;

        //echo $publicKey;
        $hashKey1 = sha1($string . $publicKey);
        $hashKey2 = md5($hashKey1);
        $hashKey3 = hash('sha224', $hashKey2);

        return $hashKey3 . ":" . $publicKey;
    }
725020
protected function toTokens(string $string = null): array
    {
        $tokens = parent::toTokens(parent::getBodyAsString());

        // Try creating any parameters
        foreach ($this->parameters as $name => $value) {
            if (null !== $value) {
                // Add the semi-colon separator
                $tokens[\count($tokens) - 1] .= ';';
                $tokens = array_merge($tokens, $this->generateTokenLines(' '.$this->createParameter($name, $value)));
            }
        }

        return $tokens;
    }