github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

samsouder / titlecase

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 12
    • 1
  • Source
  • Commits
  • Network (1)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Ruby version of John Gruber's TitleCase.pl — Read more

  cancel

http://github.com/samsouder/titlecase

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Added .gitignore to keep built gems out of the repo. 
samsouder (author)
Fri Oct 16 07:45:32 -0700 2009
commit  d2138e649d268c1d8b5f4a29d586703b4b818281
tree    fcb146f353b5bde8ae31bf151bba57b2967a02a7
parent  87e1b7a4327b4498d12f0be378787251882ad39f
titlecase /
name age
history
message
file .gitignore Loading commit data...
file README Tue May 27 05:43:30 -0700 2008 Updated readme to show the mit license url and ... [samsouder]
directory lib/ Fri Oct 16 07:01:22 -0700 2009 Added a #titlecase! self-modifying method as re... [samsouder]
directory spec/
file titlecase.gemspec Fri Oct 16 07:31:01 -0700 2009 Updated version number and date for publishing ... [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
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server