Android Unicode Convert zenkakuToHankaku(String value)

Here you can find the source of zenkakuToHankaku(String value)

Description

zenkaku To Hankaku

Declaration

private static String zenkakuToHankaku(String value) 

Method Source Code

//package com.java2s;

public class Main {
    private static String zenkakuToHankaku(String value) {
        StringBuilder sb = new StringBuilder(value);
        for (int i = 0; i < sb.length(); i++) {
            int c = (int) sb.charAt(i);
            if ((c >= 0xFF10 && c <= 0xFF19)
                    || (c >= 0xFF21 && c <= 0xFF3A)
                    || (c >= 0xFF41 && c <= 0xFF5A)) {
                sb.setCharAt(i, (char) (c - 0xFEE0));
            }// w ww .  java2 s . c o  m
        }
        value = sb.toString();
        return value;
    }
}

Related

  1. ToDBC(String input)
  2. unicodePreservingIndex(String paramString, int paramInt)
  3. unicodePreservingIndex(String str, int index)
  4. fullWidthToHalfWidth(String s)