sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

ActiveSupport::Multibyte::Unicode#unpack_graphemes

Unpack the string at grapheme boundaries. Returns a list of character
lists.

  Unicode.unpack_graphemes('क्षि') # => [[2325, 2381], [2359], [2367]]
  Unicode.unpack_graphemes('Café') # => [[67], [97], [102], [233]]

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/activesupport/lib/active_support/multibyte/unicode.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-ActiveSupport--Multibyte--Unicode-unpack_graphemes-for-pr


# Commit to git

git add app/server/ruby/vendor/activesupport/lib/active_support/multibyte/unicode.rbgit commit -m "better docs for ActiveSupport::Multibyte::Unicode#unpack_graphemes"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-ActiveSupport--Multibyte--Unicode-unpack_graphemes-for-pr

hub pull-request


# Celebrate!