Method: String#grapheme_clusters

Defined in:
string.c

#grapheme_clustersArray

Returns an array of grapheme clusters in str. This is a shorthand for str.each_grapheme_cluster.to_a.

If a block is given, which is a deprecated form, works the same as each_grapheme_cluster.

Returns:

[View source]

8994
8995
8996
8997
8998
8999
# File 'string.c', line 8994

static VALUE
rb_str_grapheme_clusters(VALUE str)
{
    VALUE ary = WANTARRAY("grapheme_clusters", rb_str_strlen(str));
    return rb_str_enumerate_grapheme_clusters(str, ary);
}