graphemer[3] text-segmentation[4] 如果想了解更多细节,可以参考JS 如何正确处理 Unicode[5] 对于Rust我们可以使用unicode_segmentation Javascript的话,我们上面提到过,可以使用浏览器内置功能Intl.Segmenter或者graphemer/text-segmentation Rust而言,我们可以使用unicode_segmentation /www.ruanyifeng.com/blog/2017/04/emoji.html [3] graphemer: https://github.com/flmnt/graphemer [4] text-segmentation : https://github.com/niklasvh/text-segmentation [5] JS 如何正确处理 Unicode: https://flaviocopes.com/javascript-unicode