I\'ve wondering is there a regex pattern that i could use to convert a pattern which is an underscore and a lowercase letter into an uppercase letter. I\'m trying to generat
Maybe you want to use Google Guava:
Code:
import static com.google.common.base.CaseFormat.LOWER_CAMEL;
import static com.google.common.base.CaseFormat.LOWER_UNDERSCORE;
public class Main {
public static void main(String[] args) {
String str = "load_id,policy_id,policy_number";
for(String columnName : str.split(",")) {
System.out.println(LOWER_UNDERSCORE.to(LOWER_CAMEL, columnName));
}
}
}
Output:
loadId
policyId
policyNumber