Ruby’s string class offers a few methods to change the case of a string.
Upcase is used to capitalize every letter of a string.
“michael”.upcase
returns: MICHAEL
Downcase is used to make every letter in a string lowercase.
“MICHAEL”.downcase
returns: michael
Another method on the string class is capitalize. This method capitalizes the first letter of a string while downcasing the remaining letters.
“mICHAel”.capitalize
returns: Michael
Titleize capitalizes every word in a string. Remember you can only use this if you are working within the Rails framework (or just the ActiveSupport gem).
name = “jaKe JoNes”
name.titleize
returns: Jake Jones
These are just a few methods on the String class. I suggest you read through this documentation to get familiar with all of the methods on String.
If you wanted it to build a product you’d find a way to get time to work on it. If you really wanted to start that new hobby you’d sacrifice something to find the time and money to do it.
I'll define a "Wannabe Entrepreneur" as someone who has never made money from their businesses. Here are the different types of wannabes.
In the past few years I've built go-carts, built a 200+ sq ft workshop, written several eBooks. How do I create a life where I have time to work on side projects?
Receive 5 Software projects mistakes we have made over the years and how to avoid them.