What's the difference between Character.toUpperCase() and Character.toTitleCase()

前端 未结 2 1953
再見小時候
再見小時候 2021-02-19 21:16

I was refactoring some of my old code and then I found out that I\'d used Character.toTitleCase() method at some point and couldn\'t help myself wondering if

2条回答
  •  难免孤独
    2021-02-19 22:20

    Standard ASCII characters are so boring! Here's something more exciting:

    System.out.println(Character.toTitleCase('dz'));  // Dz
    System.out.println(Character.toUpperCase('dz'));  // DZ
    

    Live demo.

提交回复
热议问题