Ai
4 Star 6 Fork 4

王军/golib

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
iconv.go 628 Bytes
一键复制 编辑 原始数据 按行查看 历史
王军 提交于 2025-03-27 18:57 +08:00 . 完善js内容
/*
* @Author: wangjun haodreams@163.com
* @Date: 2024-11-06 23:35:14
* @LastEditors: wangjun haodreams@163.com
* @LastEditTime: 2025-03-27 17:04:38
* @FilePath: \golib\easyjs\iconv.go
* @Description: 数据转换
*/
package easyjs
import (
"gitee.com/haodreams/golib/charset"
)
// 数据转换
type Iconv struct {
}
// GBK 转 UTF8 编码
func (m *Iconv) UTF8(text string) string {
return charset.UTF8(text)
}
// UTF8 转 GBK 编码
func (m *Iconv) GBK(text string) string {
return charset.GBK(text)
}
func (m *Iconv) IsGBK(text string) bool {
return charset.IsGBK([]byte(text))
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/haodreams/golib.git
git@gitee.com:haodreams/golib.git
haodreams
golib
golib
v1.0.0

搜索帮助