Ruby “.downcase! ” and “downcase” confusion

后端 未结 4 1942
耶瑟儿~
耶瑟儿~ 2021-01-17 06:10

I just started Ruby programming. I had read Difference Between downcase and downcase! in Ruby. However I encounter an interesting problem in practice, here is code:

4条回答
  •  别那么骄傲
    2021-01-17 07:08

    downcase! → str or nil

    Downcases the contents of str, returning nil if no changes were made. Note: case replacement is effective only in ASCII region.

    Documentation: String#downcase!

提交回复
热议问题