code: public static String format(String name, char separator, String prefix, boolean includePrefix, boolean includeLeadingSeparator) {
  		String leadingSeparators = includeLeadingSeparator ? getLeadingSeparators(name, '_') : null;
  		if (leadingSeparators != null) {
  			name = name.substring(leadingSeparators.length());
  		}
  
  		List<String> parsedName = new ArrayList<String>();
  		if (prefix != null && name.startsWith(prefix) && name.length() > prefix.length()
  				&& Character.isUpperCase(name.charAt(prefix.length()))) {
  			name = name.substring(prefix.length());
  			if (includePrefix) {
  				parsedName = parseName(prefix, '_');
  			}
  		}
  
  		if (name.length() != 0)
  			parsedName.addAll(parseName(name, '_'));
  
  		StringBuilder result = new StringBuilder();
  
  		for (Iterator<String> nameIter = parsedName.iterator(); nameIter.hasNext();) {
  			String nameComponent = nameIter.next();
  			result.append(nameComponent);
  
  			if (nameIter.hasNext() && nameComponent.length() > 1) {
  				result.append(separator);
  			}
  		}
  
  		if (result.length() == 0 && prefix != null) {
  			result.append(prefix);
  		}
  		return leadingSeparators != null ? "_" + result.toString() : result.toString();
  	}
docs: Formats a name by parsing it into words separated by underscores and/or mixed-casing and then recombining them using the specified
  separator. A prefix can also be given to be recognized as a separate word or to be trimmed. Leading underscores can be ignored or can
  cause a leading separator to be prepended.
  
  @since 2.2