Here you can find the source of toUpperCaseNotation(String camelNotation)
public static String toUpperCaseNotation(String camelNotation)
//package com.java2s; //License from project: Open Source License public class Main { public static String toUpperCaseNotation(String camelNotation) { StringBuilder sb = new StringBuilder(camelNotation.length() + 10); boolean change = true; for (int i = 0; i < camelNotation.length(); i++) { char c = camelNotation.charAt(i); change = !change && Character.isUpperCase(c); if (change) { sb.append('_'); }/* ww w . j a v a 2 s. c o m*/ sb.append(Character.toUpperCase(c)); change = Character.isUpperCase(c); } return sb.toString(); } }