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

This package is auto-updated.

Last update: 2024-10-18 20:22:50 UTC


README

build status

英数字の文字列に平仮名とカタカナのフリガナを付けます

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.