java实现全角字符转半角字符


    public static final String QJToBJChange(String QJStr)
    {
        char[] chr = QJStr.toCharArray();
        String str = "";
        for (int i = 0; i < chr.length; i++)
        {
            chr[i] = (char) ((int) chr[i] - 65248);
            str += chr[i];
        }
        return str;
    }


你可能感兴趣的:(java)