code: public static String decamelize(String s) {
  		if (isEmpty(s)) {
  			return s;
  		}
  		int length = s.length();
  		StringBuilder buf = new StringBuilder(length);
  		for (int i = 0; i < length - 1; i++) {
  			if (Character.isLowerCase(s.charAt(i)) && Character.isUpperCase(s.charAt(i + 1))) {
  				buf.append(s.charAt(i));
  				buf.append('_');
  			} else {
  				buf.append(s.charAt(i));
  			}
  		}
  		buf.append(s.charAt(length - 1));
  		return buf.toString().toUpperCase();
  	}
docs: fooBarBaz → FOO_BAR_BAZ