shiritoriHeadKey関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The kana a reading starts on, or null when it holds none.
インポート
import { shiritoriHeadKey } from "@johnmorrisdotca/kotoba";
定義
function shiritoriHeadKey(reading: string, rules?: ShiritoriRules): string | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
reading | string | The reading of a word. |
rules (省略可) | ShiritoriRules | House rules; the forgiving ones if left out. |
戻り値
string | null
The key to compare against the last word's tail, or null.
例
import { shiritoriHeadKey } from "@johnmorrisdotca/kotoba";
console.log(shiritoriHeadKey("がっこう"), shiritoriHeadKey("がっこう", { voicing: "kept" })); // か がか が出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。