How to convert a string to lower or upper case in Ruby

后端 未结 11 943
梦如初夏
梦如初夏 2020-12-07 07:00

How do I take a string and convert it to lower or upper case in Ruby?

11条回答
  •  不思量自难忘°
    2020-12-07 07:27

    You can find strings method like "strings".methods You can define string as upcase, downcase, titleize. For Example,

    "hii".downcase
    "hii".titleize
    "hii".upcase
    

提交回复
热议问题