简体中文
主题
将字符串编码为 UTF-8 格式。
import { encodeUtf8 } from 'js-cool'
function encodeUtf8(string: string): string
string
string - UTF-8 编码后的字符串。
encodeUtf8('Hello') // 'Hello' encodeUtf8('你好') // 编码后的字符串