Skip to content

Instantly share code, notes, and snippets.

@frankieroberto
Created June 9, 2010 14:51
Show Gist options
  • Save frankieroberto/431582 to your computer and use it in GitHub Desktop.
Save frankieroberto/431582 to your computer and use it in GitHub Desktop.
def capitalize_initial(string)
if string.length > 0
string[0,1].capitalize + string[1..string.length]
else
""
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment