Java Utililty Methods String Upper Case

List of utility methods to do String Upper Case

  1. HOME
  2. Java
  3. S
  4. String Upper Case

Description

The list of methods to do String Upper Case are organized into topic(s).

Method

String toUpperCase(CharSequence string)
Converts to upper case independent of the current locale via Character#toUpperCase(char) which uses mapping information from the UnicodeData file.
char upperCaseChars[] = new char[string.length()];
for (int i = 0; i < string.length(); i++) {
 upperCaseChars[i] = Character.toUpperCase(string.charAt(i));
return new String(upperCaseChars);
char toUpperCase(final char c)
to Upper Case
return (char) toUpperCase((int) c);
String toUpperCase(final String s)
GWT 1.5.3 does not support Locale in String toUpperCase.
return s.toLowerCase();
String toUpperCase(final String s)
Retrieves an all-uppercase version of the provided string.
if (s == null) {
 return null;
final int length = s.length();
final char[] charArray = s.toCharArray();
for (int i = 0; i < length; i++) {
 switch (charArray[i]) {
 case 'a':
...
String toUpperCase(final String s)
Converts a string to upper case letters
return s == null ? null : s.toUpperCase();
void toUpperCase(final StringBuilder src)
Converts all of the characters in src to to upper case using the rules of the default locale.
for (int i = 0; i < src.length(); i++) {
 src.setCharAt(i, Character.toUpperCase(src.charAt(i)));
String toUpperCase(String candidate)
Wraps to UpperCase first char in candidate
if (candidate.length() >= 1)
 return Character.toUpperCase(candidate.charAt(0)) + candidate.substring(1);
return candidate;
String toUpperCase(String from)
Returns a UPPER CASE copy of the given string from or NULL if the supplied parameter is NULL.
if (from == null) {
 return null;
return from.toUpperCase();
String toUpperCase(String in)
Returns an all-uppercase representation of the String passed in, with dashes being replaced by underscores.
StringBuilder builder = new StringBuilder();
int length = in.length();
for (int i = 0; i < length; i++) {
 char c = in.charAt(i);
 if (c == '-') {
 builder.append("_");
 } else {
 builder.append(Character.toUpperCase(c));
...
String toUpperCase(String input)
returns the upper case string, is null save {Category} StringUtil {param} string(input) input: String.
String s = getNullSaveStr(input);
return s.toUpperCase();


AltStyle によって変換されたページ (->オリジナル) /