ruby capitalize first character of sentence

a = "apples and oranges are two diffERent Fruits."
a.split.each{|i| i.capitalize!}.join(' ')

=> "Apples And Oranges Are Two Different Fruits."

3.75
4
Angelo 130 points

                                    “mICHAel”.capitalize

3.75 (4 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
ruby capitalize first character of sentence ruby on rails capitalize first letter ruby first letter upcase capitalize first letter of each word ruby ruby string downcase let capitalize first letter ruby string uppercase first letter first letter capital ruby ruby first character uppercase how to capitalize first letter in ruby how to capitalize the first letter of every word in ruby ruby make first letter uppercase capitalize first letter of first word ruby ruby capitalize first word upcase first word in string ruby make everything before a letter uppercase ruby ruby upcase first letter capitalize first letters of a sentence string in ruby ruby capitalize first letter of each word ruby capitalize first letter of string capitalize first word first letter ruby make first letter sentence string uppercase ruby make first letter uppercase ruby finding first letter uppercase of an frase in an array ruby ruby uppercase first letter array find the first letter in an array in uppercase ruby ruby upcase one letter how to make first letter capital in ruby ruby all wrds first char capitalize ruby up case the first letter of the word ruby first letter capital capitalize method ruby ruby upcase_first ruby method capitalize first letter ruby first letter uppercase capitalize first letter ruby ruby capitalize method capitalize specifici letters in ruby upcase first letter ruby ruby uppercase first letter ruby capitalized= string gem ruby capitalized string gem capitalize in ruby uppercase first letter in ruby captilize the first letter of word ruby ruby capitalize first letter capitalize ruby ruby capitalize capitalize first letter in sentence ruby ruby, how to capitalize first letter in string
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source