KanaKit class
A Dart library for handling and converting Japanese characters such as hiragana, katakana and kanji.
It contains many methods to deal with Japanese character. In some of these functions, a KanaKitConfig is used.
If config is left null
, KanaKitConfig.defaultConfig is used.
const kanaKit = KanaKit();
Every KanaKit
instance has a copyWithConfig method that allows you to
copy the instance and override config
fields.
Constructors
-
KanaKit({KanaKitConfig config}
) -
A Dart library for handling and converting Japanese characters such as
hiragana, katakana and kanji. [...]
const
Properties
- config → KanaKitConfig
-
The config used in certain conversions. [...]
final
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
copyWithConfig(
{bool passRomaji, bool passKanji, bool upcaseKatakana} ) → KanaKit - Creates a copy of this object that replaces the provided KanaKitConfig fields.
-
isHiragana(
String input ) → bool -
Tests if
input
consists entirely of hiragana characters. [...] -
isJapanese(
String input ) → bool -
Tests if
input
consists entirely of Japanese characters. [...] -
isKana(
String input ) → bool -
Tests if
input
consists entirely of kana characters. [...] -
isKanji(
String input ) → bool -
Tests if
input
consists entirely of kanji characters. [...] -
isKatakana(
String input ) → bool -
Tests if
input
consists entirely of katakana characters. [...] -
isMixed(
String input ) → bool -
Tests if
input
contains a mix of romaji and kana. [...] -
isRomaji(
String input ) → bool -
Tests if
input
consists entirely of romaji characters. [...] -
toHiragana(
String input ) → String -
Converts all characters of the
input
to hiragana. [...] -
toKana(
String input ) → String -
Converts all characters of the
input
from romaji to kana. [...] -
toKatakana(
String input ) → String -
Converts all characters of the
input
to katakana. [...] -
toRomaji(
String input ) → String -
Converts all kana characters of the
input
to romaji. [...] -
noSuchMethod(
Invocation invocation ) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other ) → bool -
The equality operator. [...]
inherited