PHP to Ruby
Convert PHP code into Ruby!
-
ucfirst
Posted on July 7th, 2009 No commentsThe ucfirst function returns a string, with the first character capitalized - only if the first character is alphabetic.
PHP
echo ucfirst("ruby is great!"); => // Ruby is great!
Ruby
puts "ruby is great!".capitalize => # Ruby is great!
Leave a reply


