Project

General

Profile

Actions

Feature #18563

closed

Add "graphemes" and "each_grapheme" aliases

Added by shan (Shannon Skipper) almost 3 years ago. Updated over 2 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:107416]

Description

https://bugs.ruby-lang.org/issues/13780#note-10

grapheme sounds like an element in the grapheme cluster. How about each_grapheme_cluster?
If everyone gets used to the grapheme as an alias of grapheme cluster, we'd love to add an alias each_grapheme.

Matz.

Languages that have added grapheme cluster support seem to be almost exclusively opting for the shorter "graphemes" alias as a part that stands for the whole.

  • JavaScript/TypeScript grapheme-splitter library: splitGraphemes
  • PHP: grapheme_extract
  • Zig ziglyph library: GraphemeIterator
  • Golang uniseg library: NewGraphemes
  • Matlab: splitGraphemes
  • Python grapheme library: graphemes
  • Elixir: graphemes
  • Crystal uni_text_seg library: graphemes
  • Nim nim-graphemes library: graphemes
  • Rust unicode-segmentation library: graphemes

Now that some time has passed and the "graphemes" alias for "grapheme clusters" has been fairly widely adopted by languages and libraries, I'd like to go ahead and propose a graphemes alias for grapheme_clusters and an each_grapheme alias for each_grapheme_cluster.


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #13780: String#each_graphemeClosednaruse (Yui NARUSE)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0