Java String Upper Case toUpperCaseUnderscore(String text)

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

Description

to Upper Case Underscore

License

Open Source License

Declaration

public static String toUpperCaseUnderscore(String text) 

Method Source Code

//package com.java2s;

public class Main {
    /**//from  w w w. j  a v  a  2s.  c o m
     * Whitespace is a String with one whitespace.
     */
    public final static String WHITESPACE = " ";

    public static String toUpperCaseUnderscore(String text) {
        text = text.toUpperCase().trim();
        text = text.replace(WHITESPACE, "_");
        return text;
    }
}

Related

  1. toUpperCaseName(String s)
  2. toUpperCaseNamespace(String string)
  3. toUppercaseNoAccents(String txt)
  4. toUpperCaseNotation(String camelNotation)
  5. toUpperCaseOfFirstChar(String string)
  6. toUpperCaseWithUnderscores(String className)
  7. toUpperCaseWithUnderscores(String str)