Android String Case Convert toUpper(char ch)

Here you can find the source of toUpper(char ch)

Description

to Upper

Declaration


public static char toUpper(char ch) 

Method Source Code

//package com.java2s;

public class Main {

    public static char toUpper(char ch) {
        if (inRange11(ch, 'a', 'z')) {
            return (char) (ch - 'a' + 'A');
        }//  w  w  w .java2 s . c  o  m
        return ch;
    }

    public static boolean inRange11(int val, int from, int to) {
        return val >= from && val <= to;
    }
}

Related

  1. toTitleCase(String s)
  2. camelString(String str, boolean firstCharacterUppercase)
  3. firstByteToLower(String instring)
  4. capitalize(String plainMessage, char letter)
  5. uncapitalize(String capitalizedMessage, char letter)
  6. toLowerSubset(String source, char substitute)
  7. UpperCase(String str)
  8. capitalize(String s)
  9. capitalize(final String str)