Java String Underscore toUnderscoredLowercase(String text)

Here you can find the source of toUnderscoredLowercase(String text)

Description

to Underscored Lowercase

License

Apache License

Declaration

public static String toUnderscoredLowercase(String text) 

Method Source Code

//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;
    }
}

Related

  1. toUnderscoreCase(final String s)
  2. toUnderscoreCase(String name)
  3. toUnderScoreCase(String s)
  4. toUnderScoreCase(String s)
  5. toUnderscored(String name)
  6. toUnderscoreName(String name)
  7. toUnderscores(String s)
  8. toUnderscoreSeparated(String name)
  9. underscore(final String s, final Locale locale)