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

Latest commit

 

History

History

lite-grapheme

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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("👨‍👨‍👧‍👦"))