In the final few lessons of “Thith meanth war,” you are supposed to put a string that removes the S’s and replaces them with Th. This is easy. What is annoying, is if I have an “i” in the middle of the phrase, I cannot capitalize it. I tried this:
print "Say sumpin! "
user_input = gets.chomp
if user_input.include? "s"
puts "You didn’t type any S’s idiot!"
if user_input.include? "i"
However, none of the i’s are replaced with I. I realize, even if this did work, it would replace i’s in the middle of words as well. Is there a way to replace only single, lower-case i’s with a capital I?
Sorry for the lack of indentions. I typed it properly, it just auto pushes it back on the forums for some reason.