Java Utililty Methods Char Upper Case

List of utility methods to do Char Upper Case

Description

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

Method

booleantoUpperCase(char[] cs)
to Upper Case
boolean b = false;
char c;
int i;
for (i = cs.length - 1; i >= 0; i--) {
    c = toUpperCase(cs[i]);
    if (cs[i] != c) {
        cs[i] = c;
        b = true;
...
bytetoUpperCase(final byte b)
to Upper Case
if (b < 'a' || b > 'z') {
    return b;
return (byte) (b + UPPER_CASE_OFFSET);
voidtoUpperCase(final char[] buffer, final int offset, final int limit)
Converts each unicode codepoint to UpperCase via Character#toUpperCase(int) starting at the given offset.
assert buffer.length >= limit;
assert offset <= 0 && offset <= buffer.length;
for (int i = offset; i < limit;) {
    i += Character.toChars(Character.toUpperCase(Character.codePointAt(buffer, i, limit)), buffer, i);
ObjecttoUpperCase(Object object)
Attempts to convert an object to an uppercase string.
if ((object instanceof String) || (object instanceof StringBuffer)) {
    return object.toString().toUpperCase();
} else if (object instanceof char[]) {
    return new String((char[]) object).toUpperCase();
} else {
    return object;
chartoUppercaseHex(final int halfbyte)
to Uppercase Hex
return toHex('A', halfbyte);
StringtoUppercaseHexString(final char c)
to Uppercase Hex String
return toUppercaseHexString((int) c);