Modifies str by converting the first character to uppercase and the remainder to lowercase. Returns nil if no changes are made. Note: case conversion is effective only in ASCII region.

   a = "hello"
   a.capitalize!   #=> "Hello"
   a               #=> "Hello"
   a.capitalize!   #=> nil

相关文章:

  • 2022-12-23
  • 2021-05-24
  • 2021-06-17
  • 2021-09-23
  • 2021-06-04
  • 2021-07-10
  • 2021-11-25
  • 2022-12-23
猜你喜欢
  • 2021-12-28
  • 2021-09-14
  • 2021-11-09
  • 2021-07-09
  • 2022-12-23
相关资源
相似解决方案