/** * Converts camel case string (lower or upper/Pascal) to upper snake case, * for example 'helloWorld' or 'HelloWorld' -> 'HELLO_WORLD'. */ public static String camelToUpperSnake(String camel) { return camelToSnake(camel, true); }
/** * Converts camel case string (lower or upper/Pascal) to lower snake case, * for example 'helloWorld' or 'HelloWorld' -> 'hello_world' or 'HELLO_WORLD'. */ public static String camelToLowerSnake(String camel) { return camelToSnake(camel, false); }