public static String nameFromExternal(final String externalName) {
        requireNonNull(externalName);
        String result = unQuote(externalName.trim()); // Trim if there are initial spaces or trailing spaces...
        /*
         CamelCase
           http://stackoverflow.com/questions/4050381/regular-expression-for-checking-if-capital-letters-are-found-consecutively-in-a
           [A-Z] -> \p{Lu}
           [^A-Za-z0-9] -> [^\pL0-90-9]
        */
        result = Stream.of(result.replaceAll("([\\p{Lu}]+)", "_$1")
            .split("[^\\pL0-9]"))
            .map(String::toLowerCase)
            .map(Formatting::ucfirst)
            .collect(Collectors.joining());
        return result;
    }
Turns the specified string into an underscore-separated string.

@param javaName  the string to parse
@return          as underscore separated
common-parent/codegen/src/main/java/com/speedment/common/codegen/util/Formatting.java