Here you can find the source of toUnderscoredLowercase(String text)
public static String toUnderscoredLowercase(String text)
//package com.java2s; //License from project: Apache License public class Main { public static String toUnderscoredLowercase(String text) { String result = text.replaceAll("(?<=[a-z0-9])[A-Z]|(?<=[a-zA-Z])[0-9]|(?<=[A-Z])[A-Z](?=[a-z])", "_$0"); result = result.toLowerCase();/*www.j a v a 2s .c o m*/ return result; } }