Here you can find the source of camelCaseToUpperCase(String in)
public static String camelCaseToUpperCase(String in)
//package com.java2s; public class Main { public static String camelCaseToUpperCase(String in) { String regex = "([a-z])([A-Z])"; String replacement = "$1_$2"; String out = in.replaceAll(regex, replacement).toUpperCase(); return out; }/*from w w w .j a v a 2 s . c o m*/ }