method

capitalize!

v1_8_7_72 - Show latest stable - Class: String
capitalize!()
public

Modifies str by converting the first character to uppercase and the remainder to lowercase. Returns nil if no changes are made.

   a = "hello"
   a.capitalize!   #=> "Hello"
   a               #=> "Hello"
   a.capitalize!   #=> nil