本文へ移動

Bushu部首

漢字に見える部品を選び、全てを含む漢字を探し、ページに部首選択を追加できます。

「部首」は、漢字を分類する部分です。 名前について(英語)

目次

リファレンス · 部品の共通部分と表示形

radicalsInKanji関数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

The radicals a character is written with, fewest strokes first.

RADKFILE is stored radical by radical, each with the kanji that hold it, because that is the direction a search runs. A kanji page asks the opposite question, and a membership test per radical answers it, which is nothing next to keeping a second copy of the index the other way round. Simplest parts first, so the list reads the way the character is built up. Code point order breaks a tie, never a locale's collation, so the same character lists its parts in the same order on every machine.

インポート

import { radicalsInKanji } from "@johnmorrisdotca/bushu";

定義

function radicalsInKanji(radicals: readonly Radical[], kanji: string): Radical[]

引数

名前型説明
radicalsreadonly Radical[]

The native radical entries; these inputs are read without mutation.

kanjistring

The kanji to look up, or the supplied kanji list where the signature requires an array.

戻り値

Radical[]

The radicals a character is written with, fewest strokes first.

例

import { RADKFILE } from "@johnmorrisdotca/bushu/radkfile";
import { radicalsInKanji } from "@johnmorrisdotca/bushu";

const radicals = RADKFILE.radicals;
console.log(radicalsInKanji(radicals,"海").map(part=>part.radical));
[ '乞', '汁', '毋', '母' ]

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/bushu 1.1.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。