Here you can find the source of camelCasePrefix(String strPrefix)
private static String camelCasePrefix(String strPrefix)
//package com.java2s; //License from project: Apache License public class Main { private static String camelCasePrefix(String strPrefix) { StringBuilder sb = new StringBuilder(); for (int i = strPrefix.length() - 1; i >= 0; i--) { char c = strPrefix.charAt(i); sb.insert(0, c);//www . j av a 2s . c o m if (i != 0 && Character.isUpperCase(c)) { // Each uppercase char in the prefix match all but uppercase chars preceding it e.g., // "AcT" matches any string starting with "Ac" followed by any number of non-uppercase chars followed by "T". // It's the same as the regex "Ac[^A-Z]*T" sb.insert(0, "[^A-Z]#"); } } return sb.toString(); } }