Skip to content

Commit

Permalink
增加 yd_string_byteLength 方法测试用例
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyong1997 committed Aug 6, 2024
1 parent 35fe5c9 commit 7a05d70
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/string/byteLength.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* @alias yd_string_byteLength
* @param {String} str 字符串数据
* @returns {String} 返回utf8字符串的字节长度
* @example yd_string_byteLength('123abc张三') -> 12
*/
export default (str) => {
let s = str.length
Expand Down

0 comments on commit 7a05d70

Please sign in to comment.