Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Latest commit

 

History

History
24 lines (15 loc) · 825 Bytes

File metadata and controls

24 lines (15 loc) · 825 Bytes

lite-grapheme

Iterates the given string on each grapheme cluster.

Maven Central

Install

Insert the following to your build.sbt.

libraryDependencies += "codes.quine.labo" %% "lite-grapheme" % "<latest version>"

Usage

Grapheme.iterate returns an iterator to iterate grapheme clusters of the string.

import codes.quine.labo.lite.grapheme.Grapheme

Grapheme.iterate("👨‍👨‍👧‍👦👩‍👩‍👧‍👦👨‍👨‍👧‍👦").toList
// res0: List[Grapheme] = List(Grapheme("👨‍👨‍👧‍👦"), Grapheme("👩‍👩‍👧‍👦"), Grapheme("👨‍👨‍👧‍👦"))