Java如何所有单词首字母大写
Java如何所有单词首字母大写
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.10.0</version>
</dependency>
/**
*
*jon skeet -> Jon Skeet
miles o'Brien -> Miles O'Brien
old mcdonald -> Old Mcdonald
*
**/
WordUtils.capitalize(str)
// "fOO BAr" -> "Foo Bar"
WordUtils.capitalizeFully(str)
Loading...