inspect() public static method

Inspects a given string and returns useful details about it.
See also: length()
See also: countKanji()
See also: countHiragana()
See also: countKatakana()
public static inspect ( string $str ) : array
$str string The string to be inspected.
return array An associative array containing the following items: - "length" : string length. - "kanji" : number of kanji within this string. - "hiragana" : number of hiragana within this string. - "katakana" : number of katakana within this string.
Example #1
0
 public function testInspectMixedCharacters()
 {
     $result = Analyzer::inspect($this->mixCharacters);
     $this->assertSame(array('length' => 19, 'kanji' => 4, 'hiragana' => 5, 'katakana' => 3), $result);
 }