furiganaOfExample関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A sentence stored with its furigana marked |kanji《かな》 as pieces: the text and the kana over the kanji.
インポート
import { furiganaOfExample } from "@johnmorrisdotca/jisho/examples";
定義
function furiganaOfExample(text: string): FuriganaPart[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
text | string | A sentence as the data stores it. |
戻り値
FuriganaPart[]
The pieces, which put together are the sentence; the whole sentence in one piece when it has no furigana.
例
import { furiganaOfExample } from "@johnmorrisdotca/jisho/examples";
console.log(furiganaOfExample("|私《わたし》は|走《はし》る")); // [{ text: "私", reading: "わたし" }, { text: "は" }, ...][
{ text: '私', reading: 'わたし' },
{ text: 'は' },
{ text: '走', reading: 'はし' },
{ text: 'る' }
]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。