Overtrue\Pinyin\Pinyin::prepare PHP 메소드

prepare() 보호된 메소드

Preprocess.
protected prepare ( string $string ) : string
$string string
리턴 string
    protected function prepare($string)
    {
        $string = preg_replace_callback('~[a-z0-9_-]+~i', function ($matches) {
            return "\t" . $matches[0];
        }, $string);
        return preg_replace("~[^\\p{Han}\\p{P}\\p{Z}\\p{M}\\p{N}\\p{L}\t]~u", '', $string);
    }