Is there any way to convert an entire user inputed string from uppercase, or even part uppercase to lowercase? eg. Kilometers --> kilometers. I am writing a program that doesn't work when any sort of uppercase word is inputed and it would take LOTS more lines of code to make it work with uppercase. (I'm kind of new to programming so this may seem like a stupid question). THANKS
Take the 2-minute tour
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
|
Official documentation here |
|||||
|
You can do what Peter said, or if you want the user to input something you could do this:
It will then automatically convert the thing they typed into lowercase. :) Note: |
||||
|
also, you can overwrite some variables:
if you use like this:
it will work just when call. |
|||
|
This doesn't work for non-english words in utf-8. In this case
|
|||
|