Java String Upper Case toUpperCase(String text)

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

Description

to Upper Case

License

Open Source License

Declaration

public static String toUpperCase(String text) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String toUpperCase(String text) {
        if (text != null) {
            int len = text.length();
            if (len > 0) {
                char[] buf = new char[len];
                for (int i = 0; i < len; i++) {
                    buf[i] = Character.toUpperCase(text.charAt(i));
                }//from   w ww  .  ja v a  2 s  .c  o  m
                text = new String(buf);
            }
        }
        return text;
    }
}

Related

  1. toUpperCase(String str)
  2. toUpperCase(String str)
  3. toUpperCase(String string)
  4. toUpperCase(String string)
  5. toUpperCase(String text)
  6. toUpperCase(String text)
  7. toUpperCase(String value)
  8. toUpperCase(String value)
  9. toUpperCase(String[] header)