countKanji() публичный статический Метод

Count number of kanji within the specified string.
public static countKanji ( string $str, boolean $extended = false ) : integer
$str string The input string.
$extended boolean Determines whether to use the extended kanji set
Результат integer Returns the number of kanji.
Пример #1
0
 public function testCountKanjiExtended()
 {
     $result = Analyzer::countKanji('三ヶ日', TRUE);
     $this->assertEquals(3, $result);
 }
Пример #2
0
 public function testCountKanjiWhenNoKanji()
 {
     $result = Analyzer::countKanji($this->hiraganaCharacters);
     $this->assertEquals($result, 0);
 }