sonic-pi

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

C++

Code. Music. Live.

String#titleize

Capitalizes all the words and replaces some characters in the string to create
a nicer looking title. +titleize+ is meant for creating pretty output. It is not
used in the Rails internals.

+titleize+ is also aliased as +titlecase+.

  'man from the boondocks'.titleize # => "Man From The Boondocks"
  'x-men: the last stand'.titleize  # => "X Men: The Last Stand"

Source | Google | Stack overflow

Edit

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

cd sonic-pi

open app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/core_ext/string/inflections.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-String-titleize-for-pr


# Commit to git

git add app/server/ruby/vendor/activesupport-7.0.6/lib/active_support/core_ext/string/inflections.rbgit commit -m "better docs for String#titleize"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-String-titleize-for-pr

hub pull-request


# Celebrate!