Java Char Upper Case toUpperCase(char c)

Here you can find the source of toUpperCase(char c)

Description

to Upper Case

License

Open Source License

Declaration

public static final char toUpperCase(char c) 

Method Source Code

//package com.java2s;
/*// w ww.j  a va2 s  . co  m
 * This file is part of the Jose Project
 * see http://jose-chess.sourceforge.net/
 * (c) 2002-2006 Peter Sch?fer
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 */

public class Main {
    /**   maps characters to rows/columns  */
    protected static short[] gCharacterMap;

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

    public static final void toUpperCase(char[] c) {
        for (int i = c.length - 1; i >= 0; i--)
            c[i] = toUpperCase(c[i]);
    }

    public static final char stripDiacritic(char c) {
        short ety = gCharacterMap[c];
        if (ety == 0)
            return c;
        else
            return (char) (ety & 0x00ff);
    }
}

Related

  1. toUpperCase(byte b)
  2. toUpperCase(byte[] in)
  3. toUpperCase(char a)
  4. toUpperCase(char a)
  5. toUpperCase(char a)
  6. toUpperCase(char c)
  7. toUpperCase(char c)
  8. toUpperCase(char ch)
  9. toUpperCase(char input)