Here you can find the source of camelToUnder(String value)
Parameter | Description |
---|---|
value | a parameter |
public static String camelToUnder(String value)
//package com.java2s; //License from project: Open Source License public class Main { /**// w w w.j a va 2 s.co m * convierte el string value de formato camelcase to underscore * @param value * @return */ public static String camelToUnder(String value) { String regex = "([a-z])([A-Z])"; String replacement = "$1_$2"; return value.replaceAll(regex, replacement).toLowerCase(); } }