• Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference between the methods on Character WC objects  RSS feed

 
Ranch Hand
Posts: 577
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone tell the difference between the methods

Character.toUpperCase(char) and
Character.toTitleCase(char)?

As far as I know they both do the same thing i,e.. converting a character to upper case. Tell me when output is different.

Regards,
Narendranath
 
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the English alphabet, there's no difference between upper case and title case, but for some other alphabets and languages there is. The Javadoc for Character.isTitleCase() has a bit of an explanation.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!