Documentation
¶
Index ¶
- func ContainsHiragana(s string) bool
- func ContainsKanji(s string) bool
- func ContainsKatakana(s string) bool
- func ExtractKanji(s string) []string
- func HiraganaToKatakana(r rune) rune
- func IsHiragana(s string) bool
- func IsKanji(s string) bool
- func IsKatakana(s string) bool
- func KatakanaToHiragana(r rune) rune
- func ToHiragana(s string) string
- func ToKana(s string) string
- func ToKatakana(s string) string
- func ToRomaji(s string, vocalize bool) string
- func ToRomajiCased(s string, vocalize bool) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsHiragana ¶
ContainsHiragana returns true if a string contains any hiragana characters.
func ContainsKanji ¶
ContainsKanji returns true if a string contains any kanji characters.
func ContainsKatakana ¶
ContainsKatakana returns true if a string contains any katakana characters.
func ExtractKanji ¶
ExtractKanji returns a slice containing all kanji characters found in a string, in the order in which they were found. If a kanji exists multiple times in a string, then each instance of the kanji will be returned.
func HiraganaToKatakana ¶
HiraganaToKatakana replaces a single hiragana character with the unicode equivalent katakana character.
func IsHiragana ¶
IsHiragana returns true if every element of a string is hiragana, except for characters indicated in sanitizeIsChecks (spaces and dashes).
func IsKanji ¶
IsKanji returns true if every element of a string is a kanji character, except for characters indicated in sanitizeIsChecksKanji (spaces).
func IsKatakana ¶
IsKatakana returns true if every element of a string is katakana, except for characters indicated in sanitizeIsChecks (spaces and dashes).
func KatakanaToHiragana ¶
KatakanaToHiragana replaces a single katakana character with the unicode equivalent hiragana character.
func ToHiragana ¶
ToHiragana converts wapuro-hepburn romaji into the equivalent hiragana.
func ToKana ¶
ToKana converts wapuro-hepburn uppercase and lowercase romaji into katakana and hiragana respectively.
func ToKatakana ¶
ToKatakana converts wapuro-hepburn romaji into the equivalent katakana.
func ToRomaji ¶
ToRomaji converts hiragana and/or katakana to lowercase romaji. By default, the literal transliteration of づ and ぢ are used, returnin du and di, respectively. Set vocalize to true to return the romaji in its correctly pronounced form - zu and ji.
func ToRomajiCased ¶
ToRomajiCased converts hiragana and/or katakana to cased romaji, where hiragana and katakana are presented in lowercase and uppercase respectively.
Types ¶
This section is empty.