PHP to Ruby
Convert PHP code into Ruby!
-
strtoupper
Posted on March 31st, 2009 No commentsReturns the argument provided with all alphabetic characters converted to uppercase.
PHP
echo strtoupper('Ruby is pure OO'); // => RUBY IS PURE OO
Ruby
puts 'Ruby is pure OO'.upcase; # => RUBY IS PURE OO
-
strtolower
Posted on March 8th, 2009 No commentsReturns the argument provided with all alphabetic characters converted to lowercase.
PHP
echo strtolower('Ruby is pure OO'); // => ruby is pure oo
Ruby
puts 'Ruby is pure OO'.downcase; # => ruby is pure oo


