public String getFullPinyin(String str) {
        if (str == null) return null;

        StringBuffer sb = new StringBuffer();
        String[] item = null;
        for (int i = 0; i < str.length(); i++) {
            char ch = str.charAt(i);
            item = getPinyinFromChar(ch);
            if (item == null) {
                sb.append(ch);
            } else {
                sb.append(item[0].substring(0, item[0].length() - 1));
            }
        }
        return sb.toString();
    }
public String getFullPinyin(String str) {
        if (str == null) return null;

        StringBuffer sb = new StringBuffer();
        String[] item = null;
        for (int i = 0; i < str.length(); i++) {
            char ch = str.charAt(i);
            item = getPinyinFromChar(ch);
            if (item == null) {
                sb.append(ch);
            } else {
                sb.append(item[0].substring(0, item[0].length() - 1));
            }
        }
        return sb.toString();
    }
public String getFullPinyin ( String str ) { if ( str == null ) return null ; StringBuffer sb = new StringBuffer ( ) ; String [ ] item = null ; for ( int i = 0 ; i < str . length ( ) ; i ++ ) { char ch = str . charAt ( i ) ; item = getPinyinFromChar ( ch ) ; if ( item == null ) { sb . append ( ch ) ; } else { sb . append ( item [ 0 ] . substring ( 0 , item [ 0 ] . length ( ) - 1 ) ) ; } } return sb . toString ( ) ; }
得到字符串对应的拼音(默认小写, 不带声调), 不可识别的字符原样返回.
得到字符串对应的拼音 ( 默认小写 不带声调 ) 不可识别的字符原样返回 .