Java String Upper Case toUpperCase(String s)

Here you can find the source of toUpperCase(String s)

Description

to Upper Case

License

LGPL

Declaration

public static String toUpperCase(String s) 

Method Source Code

//package com.java2s;
/**/*from w  w w  .  j  av  a 2 s .com*/
* Converts a line of text into an array of lower case words using a
* BreakIterator.wordInstance().
* <p>
* 
* This method is under the Jive Open Source Software License and was written
* by Mark Imbriaco.
* 
* @param text
*          a String of text to convert into an array of words
* @return text broken up into an array of words.
*/

public class Main {

    public static char toUpperCase(char c) {
        return Character.toUpperCase(c);
    }

    public static String toUpperCase(String s) {
        if (s == null)
            return null;
        else {
            return s.toUpperCase();
            /*
            * StringBuffer stringbuffer = new StringBuffer(); for(int i = 0; i <
            * s.length(); i++) stringbuffer.append(toUpperCase(s.charAt(i)));
            * 
            * return stringbuffer.toString();
            */
        }
    }
}

Related

  1. toUpperCase(String pString)
  2. toUpperCase(String s)
  3. toUpperCase(String s)
  4. toUpperCase(String s)
  5. toUpperCase(String s)
  6. toUpperCase(String s)
  7. toUpperCase(String s)
  8. toUpperCase(String s, int start, int end)
  9. toUpperCase(String source)