Android Unicode Convert unicodePreservingIndex(String paramString, int paramInt)

Here you can find the source of unicodePreservingIndex(String paramString, int paramInt)

Description

unicode Preserving Index

Declaration

public static int unicodePreservingIndex(String paramString,
            int paramInt) 

Method Source Code

//package com.java2s;

public class Main {
    public static int unicodePreservingIndex(String paramString,
            int paramInt) {
        if (paramInt > 0) {
            int i = paramString.length();
            if (paramInt < i) {
                int j = paramInt + -1;
                if ((Character.isHighSurrogate(paramString.charAt(j)))
                        && (Character.isLowSurrogate(paramString
                                .charAt(paramInt))))
                    paramInt += -1;//ww w. ja v a 2s  . c o  m
            }
        }
        return paramInt;
    }
}

Related

  1. zenkakuToHankaku(String value)
  2. ToDBC(String input)
  3. unicodePreservingIndex(String str, int index)
  4. fullWidthToHalfWidth(String s)
  5. getEncodedSize(String value)
  6. halfWidthToFullWidth(String s)