What is the most elegant way to convert a hyphen separated word (e.g. "do-some-stuff") to the lower camel-case variation (e.g. "doSomeStuff") in Java?
Use CaseFormat from Guava:
CaseFormat
import static com.google.common.base.CaseFormat.*; String result = LOWER_HYPHEN.to(LOWER_CAMEL, "do-some-stuff");
1.4m articles
1.4m replys
5 comments
57.0k users