1、split 结合 filter(Boolean)使用,可以过滤空字符


2、分割 Unicode 字符 用 Array.from() 实现
const text = "👍😊👨👩👦";
const result = Array.from(text);
console.log(result);
// 输出: ['👍', '😊', '👨👩👦'] (完整分割)
1、split 结合 filter(Boolean)使用,可以过滤空字符


2、分割 Unicode 字符 用 Array.from() 实现
const text = "👍😊👨👩👦";
const result = Array.from(text);
console.log(result);
// 输出: ['👍', '😊', '👨👩👦'] (完整分割)
1536
1194

被折叠的 条评论
为什么被折叠?
&spm=1001.2101.3001.5002&articleId=144051218&d=1&t=3&u=76a0fcc215a14e3994823bcdeea8291a)