This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Run the following if you haven't already:
gem sources -a http://gems.github.com
Install the gem(s):
sudo gem install samsouder-titlecase
| name | age | message | |
|---|---|---|---|
| |
README | Tue May 27 05:43:30 -0700 2008 | [samsouder] |
| |
lib/ | Fri May 23 20:32:52 -0700 2008 | [samsouder] |
| |
spec/ | Fri May 23 20:32:52 -0700 2008 | [samsouder] |
| |
titlecase.gemspec | Fri May 23 21:54:58 -0700 2008 | [samsouder] |
README
Ruby String Extensions To Add Title Case Support
================================================
A set of methods added onto the String class to allow easy title casing of strings.
This extension is available as a gem via GitHub:
$ sudo gem install samsouder-titlecase --source=http://gems.github.com
Usage:
require 'rubygems'
require 'titlecase'
puts "this is a test".titlecase
Derived from the rules set by John Gruber at <http://daringfireball.net/2008/05/title_case>. I also derived my test
cases from his set. If you find any edge cases, please feel free to add them to the examples.yaml file.
Rules from John Gruber:
-----------------------
- capitalize each word
- downcase each of the small_words
- words with capitals after the first character are left alone
- words with periods are left alone
- first and last word always capitalized
- small words after colons are capitalized
Sam Souder <samsouder@gmail.com>
Created May 22, 2008
Perl version created by:
John Gruber
http://daringfireball.net/
May 10 2008
License: http://www.opensource.org/licenses/mit-license.php




