Skip to content

Latest commit

 

History

History
6 lines (5 loc) · 348 Bytes

grapheme_clusters.rdoc

File metadata and controls

6 lines (5 loc) · 348 Bytes

Returns an array of the grapheme clusters in self (see Unicode Grapheme Cluster Boundaries):

s = "\u0061\u0308-pqr-\u0062\u0308-xyz-\u0063\u0308" # => "ä-pqr-b̈-xyz-c̈"
s.grapheme_clusters
# => ["ä", "-", "p", "q", "r", "-", "b̈", "-", "x", "y", "z", "-", "c̈"]