Skip to content

decodeUtf8

解码 UTF-8 编码的字符串。

用法

js
import { decodeUtf8 } from 'js-cool'

签名

typescript
function decodeUtf8(utftext: string): string

参数

参数类型描述
utftextstringUTF-8 编码的字符串

返回值

string - 解码后的字符串。

示例

js
decodeUtf8(encodedString) // '你好'

相关

基于 MIT 许可发布