Hướng dẫn normalize string php
normalizer_normalize(PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL intl >= 1.0.0) Show Normalizer::normalize -- normalizer_normalize — Normalizes the input provided and returns the normalized string 说明面向对象风格 public static
Normalizer::normalize(string normalizer_normalize(string 参数string The input string to normalize form One of the normalization forms. 返回值The normalized string or 范例示例 #1 normalizer_normalize() example
urlencode($char_1); 示例 #2 OO example
urlencode($char_1); 以上例程会输出: 参见
spam at oscar dot xyz ¶ 7 years ago
anrdaemon at freemail dot ru ¶ 4 years ago
akniep at rayo dot info ¶ 13 years ago
$s = Normalizer::normalize( $s, Normalizer::FORM_D );$s = preg_replace( '@\pM@u' , "", $s ); // removes diacritics$s = preg_replace( '@\x{00df}@u' , "ss", $s ); // maps German ß onto ss tom dot vom dot berg at online dot de ¶ 8 years ago
|