Here you can find the source of camelToSnakeCase(String camelcase)
public static String camelToSnakeCase(String camelcase)
//package com.java2s; //License from project: Open Source License public class Main { public static String camelToSnakeCase(String camelcase) { return camelcase.replaceAll("([A-Z][a-z])", "_$1"); }//w w w . ja v a2 s .c o m }