0.1.1 β’ Published 3 months ago
unicode_segmentation v0.1.1
Unicode Segmentation
This library provides node binding for rust package Unicode Segmentation Crate
Installation
npm install -s unicode-segmentation
Usage
import { graphemes } from "unicode_segmentation";
const stringToSplit = "Lorem ππ ipsum π΅οΈββοΈdolor adipiscingπππ€ elit, sed do eiusmodπ₯° tempor π€π€π³οΈβπ."
const result = graphemes(stringToSplit)
console.log(result);
/* Output
[
'L', 'o', 'r', 'e', 'm', ' ', 'π', 'π',
' ', 'i', 'p', 's', 'u', 'm', ' ', 'π΅οΈββοΈ',
'd', 'o', 'l', 'o', 'r', ' ', 'a', 'd',
'i', 'p', 'i', 's', 'c', 'i', 'n', 'g',
'π', 'π', 'π€', ' ', 'e', 'l', 'i', 't',
',', ' ', 's', 'e', 'd', ' ', 'd', 'o',
' ', 'e', 'i', 'u', 's', 'm', 'o', 'd',
'π₯°', ' ', 't', 'e', 'm', 'p', 'o', 'r',
' ', 'π€', 'π€', 'π³οΈβπ', '.'
]
*/
This library exposes all functions from the Unicode Segmentation Crate. For more detailed documentation please visit this link