fork download
  1. def camel_case(str)
  2. ary = str.split
  3. ary[0].downcase + ary[1..-1].map(&:capitalize).join
  4. end
  5.  
  6. puts camel_case "This is a test"
Success #stdin #stdout 0.01s 7452KB
stdin
Standard input is empty
stdout
thisIsATest