Android Unicode Convert hiraganaToKatakana(byte[] b)

Here you can find the source of hiraganaToKatakana(byte[] b)

Description

hiragana To Katakana

Declaration

public static void hiraganaToKatakana(byte[] b) 

Method Source Code

//package com.java2s;

public class Main {

    public static void hiraganaToKatakana(byte[] b) {
        int len = b.length;
        if ((len & 1) == 1) {
            b[len - 1] = '\0';
            len--;//from  w  w w .  j  av  a 2 s  . co m
        }
        for (int i = 0; i < len; i += 2) {
            int high = b[i] & 0xff;
            int low = b[i + 1] & 0xff;
            if (high == '\0' || low == '\0') {
                break;
            } else if (high == 0x24 && (low >= 0x21 && low <= 0x76)) {
                b[i] = (byte) 0x25;
            }
        }
    }
}

Related

  1. stringToUnicode(String strText)
  2. unicode2han3last_direct(Character c)
  3. unicode2han_str(String str)
  4. unicodeEscape(String s)
  5. getEmojiByUnicode(int unicode)