本文主要是介绍驼峰,连接符,下划线命名等互相转换 CaseFormat.LOWER_CAME等,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1 jar:
guava-r05.jar
2
String orderColumn = "orderColumn";//输入是LOWER_CAMEL,输出是LOWER_UNDERSCOREorderColumn = CaseFormat.LOWER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, orderColumn);System.out.println(orderColumn);//order_columnorderColumn = "orderColumn";//输入是LOWER_CAMEL,输出是UPPER_CAMELorderColumn = CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_CAMEL,orderColumn);System.out.println(orderColumn);//OrderColumnorderColumn = "order_column";//输入是LOWER_UNDERSCORE,输出是LOWER_CAMELorderColumn = CaseFormat.LOWER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL,orderColumn);System.out.println(orderColumn);//orderColumn
end
这篇关于驼峰,连接符,下划线命名等互相转换 CaseFormat.LOWER_CAME等的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!