public static int displayWidth(String s){
  int width=0;
  int len=s.length();
  for (int i=0; i < len; ++i) {
    width+=displayWidth(s.charAt(i));
  }
  return width;
}

public static int displayWidth ( String s ) { int width = 0 ; int len = s . length ( ) ; for ( int i = 0 ; i < len ; ++ i ) { width += displayWidth ( s . charAt ( i ) ) ; } return width ; }
returns the approximate display width of the string , measured in units of ascii characters .
