Created
December 23, 2011 15:36
-
-
Save schatteleyn/1514484 to your computer and use it in GitHub Desktop.
Implementation in Ruby of https://github.com/schatteleyn/Convertor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#coding: utf-8 | |
def convertor(string, delimiter='\n') | |
string.split(delimiter).each{ |c| c.capitalize! }.join(delimiter) | |
end | |
# Will remove capital letter in the rest of the string. Didn't found a simple way to keep them. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment