sudnonk / furigana-tsukeruyatsu
英数字にフリガナを振るライブラリです。This library converts alphabet and numbers to Japanese ruby in Hiragana and Katakana.
v2.0.2
2019-10-02 08:46 UTC
Requires
- php: >=7.0
Requires (Dev)
- php-coveralls/php-coveralls: ^2.0
- phpunit/phpunit: ^7.1
README
英数字の文字列に平仮名とカタカナのフリガナを付けます
Sample
$hoge = Furigana::convert("abAB012"); // えーびーエービーぜろいちに $hoge2 = Furigana::convert("あいうえ"); // throws InvalidArgumentException. $hoge2 = Furigana::convert("abc.;あいう,012", true); // えーびーしー.;あいう,ぜろいちに $hoge3 = Furigana::convert("abAB012",false, "、"); // えー、びー、エー、ビー、ぜろ、いち、に
Install
conposer require sudnonk/furigana-tsukeruyatsu
Environment
This library may works in php ^7.0
. But highly recommend using php ^7.1
, because I tests only in php ^7.1
.
Default convert table
defined at src/Furigana.php
.