Categorygithub.com/gopherlib/wubi
modulepackage
0.1.0
Repository: https://github.com/gopherlib/wubi.git
Documentation: pkg.go.dev

# README

简介

汉字转五笔编码,五笔编码转汉字,支持自定义码表,默认集成了86版、98版、新世纪版本码表。

使用示例

import "github.com/gopherlib/wubi"

以下代码使用86版五笔作为示例,其它98版、新世纪版使用方法类似。

86版汉字转五笔码

c := wubi.New86()
codes := c.GetCode('在')
fmt.Println(codes) 

// [d dhf dhfd]

86版多个汉字转五笔码

c := wubi.New86()
codes := c.GetCodes("干一行,爱一行,一行行,行行行,一行不行,行行不行")
fmt.Println(codes) 

// [[fggh] [g ggl ggll] [tf tfhh] [,] [ep epd epdc] [g ggl ggll] [tf tfhh] [,] [g ggl ggll] [tf tfhh] [tf tfhh] [,] [tf tfhh] [tf tfhh] [tf tfhh] [,] [g ggl ggll] [tf tfhh] [i gi gii] [tf tfhh] [,] [tf tfhh] [tf tfhh] [i gi gii] [tf tfhh]]

86版五笔码转汉字

c := wubi.New86()
chars := c.GetChar("d")
fmt.Println(chars) 

// [在 石]

86版多个五笔码转汉字

c := wubi.New86()
chars := c.GetChars([]string{"d", "r"})
fmt.Println(chars) 

// [[在 石] [白 的]]

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

NenWithDict 使用自定义码表创建转换器实例.
New 创建一个转换器实例.
New06 新世纪版.
New86 86版.
New98 98版.
RegisterVersion 注册自定义版本,可以覆盖默认的码表数据.

# Constants

默认支持的版本.
默认支持的版本.
默认支持的版本.

# Structs

Wubi 五笔码转换器.

# Type aliases

Dictionary 五笔码表.
Version 五笔版本.