Java String Camel Case to Upper Case camelCaseToUpperCase(String in)

Here you can find the source of camelCaseToUpperCase(String in)

Description

camel Case To Upper Case

License

Open Source License

Declaration

public static String camelCaseToUpperCase(String in) 

Method Source Code

//package com.java2s;

public class Main {
    public static String camelCaseToUpperCase(String in) {
        String regex = "([a-z])([A-Z])";
        String replacement = "$1_$2";
        String out = in.replaceAll(regex, replacement).toUpperCase();
        return out;
    }/*from   w w w .j  a  v  a  2  s .  c  o  m*/
}

Related

  1. camelCaseToUpperCase(final String camelCase)
  2. camelCaseToUpperCase(String camelCaseName)
  3. camelToUpper(String camel)
  4. camelToUpper(String name)
  5. camelToUpper(String s)