1.0.1 • Published 3 years ago

gbk-encode v1.0.1

Weekly downloads
4
License
ISC
Repository
-
Last release
3 years ago

gbk-encode

为小票中文打印设计的编码工具 An encode-tool designed for Chinese printing

我不是本库的作者,代码源于网络,上传NPM方便大家使用

I am not the author of the code, collected from Internet and uploaded to NPM for easier access

NPM version

安装 Installation

$ npm install gbk-encode

使用 Usage

方法 Methods:

require("gbk-encode").encode(str)
//把中文字符串编码为GBK格式
//Encode Chinese string into GBK encoding

require("gbk-encode").decode(str)
//解码GBK格式的中文
//Decode Chinese string of GBK encoding
  • str (string): 输入字符串 / Input string

Demo: