Tuesday, February 21, 2012

how can get unicode from String in java/android


public class Test
{
   public static void main(String[] args)
     {
        String str = "Bangladesh";
        System.out.println("String : " + str);
        int uniCodePoint = str.codePointAt(2);
        System.out.println("Character (unicode point) at" + " "
                + "index 3 in given string :" + uniCodePoint);
      }
   }

No comments:

Post a Comment