Desk2Mob

Desk2Mob

Desk2Mob

Ruby - String Class

  • capitalize method

    • capitalize method converted first character of string to uppercase and remaining to lowercase. Here are some examples
       "ruby".capitalize
          => "Ruby"
       "RUBY".capitalize
         => "Ruby"
       "a1b1c1".capitalize
          => "A1b1c1" 
       "123ABC".capitalize
           => "123abc" 
    

Posted on February 21, 2014 by Amit Pandya in Ruby, Ruby - String Class


All Posts