Question: How do you capitalize all characters in a string?
Answer: “this is my string”.upcase If the string is in a variable: @my_string.upcase Note: The method: upcase! is another alternative. See next question regarding methods that end with an exclamation.
Question:
How do you capitalize all characters in a string? Answer:
“this is my string”.upcase If the string is in a variable: @my_string.upcase Note: The method: upcase! is another alternative. See next question regarding methods that end with an exclamation. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
There should not be any Spelling Mistakes.
There should not be any Gramatical Errors.
Answers must not contain any bad words.
Answers should not be the repeat of same answer, already approved.