Ruby | String capitalize() Method
capitalize is a String class method in Ruby which is used to return a copy of the given string by converting its first character uppercase and the remaining to lowercase.
Parameters: Here, str is the given string which is to be converted.
Returns: Copy of the string with the first character in uppercase and remaining in lowercase.
My Personal Notes arrow_drop_up
Please Login to comment...