Documentation
¶
Index ¶
- func Convert(formName string, writer io.Writer, txt io.Reader, foldFlag bool) error
- func ConvertString(formName string, txt string, foldFlag bool) (string, error)
- func FormList() []string
- func ReplaceChokuon(txt string) string
- func ReplaceHiragana(txt string) string
- func ReplaceKatakana(txt string) string
- func ReplaceYouon(txt string) string
- type Form
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertString ¶
ConvertString function converts kana character in text string.
Example ¶
package main import ( "fmt" "github.com/spiegel-im-spiegel/gnkf/kana" ) func main() { txt := "あいうえおわゐゑをんゔゕゖゝゞアイウエオワヰヱヲンヴヵヶヽヾ" str, err := kana.ConvertString("hiragana", txt, false) if err != nil { return } fmt.Println(str) str, err = kana.ConvertString("katakana", txt, false) if err != nil { return } fmt.Println(str) str, err = kana.ConvertString("chokuon", txt, false) if err != nil { return } fmt.Println(str) }
Output: あいうえおわゐゑをんゔゕゖゝゞあいうえおわゐゑをんゔゕゖゝゞ アイウエオワヰヱヲンヴヵヶヽヾアイウエオワヰヱヲンヴヵヶヽヾ あいうえおわゐゑをんゔかけゝゞアイウエオワヰヱヲンヴカケヽヾ
func ReplaceChokuon ¶
ReplaceChokuon replaces chokuon (upper kana case).
func ReplaceHiragana ¶
ReplaceHiragana replaces hiragana from katrakana (full-width kana kcharacter only).
func ReplaceKatakana ¶
ReplaceKatakana replaces katakana from hiragana (full-width kana kcharacter only).
func ReplaceYouon ¶
ReplaceYouon replaces youon (lower kana case).
Types ¶
Click to show internal directories.
Click to hide internal directories.