Méthode | Description | |
---|---|---|
charAt ( string $str, integer $index ) : string | Returns the character at the specified index. | |
convertHiraganaToKatakana ( string $str ) : string | Convert the given string from hiragana to katakana. | |
convertKatakanaToHiragana ( string $str ) : string | Convert the given string from katakana to hiragana. | |
countSubString ( string $str, string $needle ) : integer | Counts the number of substring occurrences. | |
extractHiragana ( string $str, integer $length, boolean $yoon = false ) : array | Split a given string to extract hiragana substrings. | |
extractKana ( string $str, integer $length, boolean $yoon = false ) : array | Split a given string to extract kana substrings. | |
extractKanji ( string $str, integer $length ) : array | Split a given string to extract kanji substrings. | |
extractKatakana ( string $str, integer $length, boolean $yoon = false ) : array | Split a given string to extract katakana substrings. | |
removeMacrons ( string $str ) : string | Remove macrons from the specified string. | |
split ( string $str, integer $length = 1, boolean $yoon = false ) : array | Enhance default splitter function to handle UTF-8 characters. | |
subString ( string $str, integer $begin, integer $length ) : string | Returns a new string that is a substring of the given string. | |
trim ( string $str ) : string | Enhance default trim() to trim unicode whitespace. |
public static convertHiraganaToKatakana ( string $str ) : string | ||
$str | string | String to be converted. |
Résultat | string | Converted string. |
public static convertKatakanaToHiragana ( string $str ) : string | ||
$str | string | String to be converted. |
Résultat | string | Converted string. |
public static extractHiragana ( string $str, integer $length, boolean $yoon = false ) : array | ||
$str | string | The input string. |
$length | integer | (optional) Define an optional substring length. Default to 0 which means substrings will be returned as it is. |
$yoon | boolean | (optional) Whether considering the base syllable and the following yoon character as a single character or not Default to false. |
Résultat | array | An array of hiragana substrings. |
public static extractKana ( string $str, integer $length, boolean $yoon = false ) : array | ||
$str | string | The input string. |
$length | integer | (optional) Define an optional substring length. Default to 0 which means substrings will be returned as it is. |
$yoon | boolean | (optional) Whether considering the base syllable and the following yoon character as a single character or not Default to false. |
Résultat | array | An array of kana substrings. |
public static extractKatakana ( string $str, integer $length, boolean $yoon = false ) : array | ||
$str | string | The input string. |
$length | integer | (optional) Define an optional substring length. Default to 0 which means substrings will be returned as it is. |
$yoon | boolean | (optional) Whether considering the base syllable and the following yoon character as a single character or not Default to false. |
Résultat | array | An array of katakana substrings. |
public static removeMacrons ( string $str ) : string | ||
$str | string | The input string. |
Résultat | string | Cleaned string. |
public static split ( string $str, integer $length = 1, boolean $yoon = false ) : array | ||
$str | string | The string to split. |
$length | integer | (optional) Define an optional substring length. Default to 1. |
$yoon | boolean | (optional) Whether considering the base syllable and the following yoon character as a single character or not Default to false. |
Résultat | array | An array of strings. |