用法
safeEncodeURIComponent 函数用于编码 URL 组件(安全版本)。
import { safeEncodeURIComponent } from '@movk/core'
safeEncodeURIComponent('中文') // '%E4%B8%AD%E6%96%87'
safeEncodeURIComponent('hello world') // 'hello%20world'
API
safeEncodeURIComponent(str)
编码 URL 组件(安全版本)。
参数
str
string required
要编码的字符串。
返回值
返回值
string
编码后的字符串。
Changelog
No recent changes