hasLatinLetters() 공개 정적인 메소드

Determines whether the given string contains latin letters
public static hasLatinLetters ( string $str ) : boolean
$str string The string to inspect.
리턴 boolean TRUE if it contains latin letters, otherwise FALSE.
예제 #1
0
 private function getType($str)
 {
     $type = 'O';
     if (Analyzer::hasJapaneseNumerals($str)) {
         $type = 'M';
     } elseif (Analyzer::hasKanji($str, true)) {
         $type = 'H';
     } elseif (Analyzer::hasHiragana($str)) {
         $type = 'I';
     } elseif (Analyzer::hasKatakana($str)) {
         $type = 'K';
     } elseif (Analyzer::hasLatinLetters($str)) {
         $type = 'A';
     } elseif (Analyzer::hasWesternNumerals($str)) {
         $type = 'N';
     }
     return $type;
 }
예제 #2
0
 public function testHasLatinFullwidth()
 {
     $result = Analyzer::hasLatinLetters('Test');
     $this->assertEquals(TRUE, $result);
 }