private String makePretty(double number){
  String r=mFormattedStringCache.getFormattedValue(number);
  int numericValue1=Character.getNumericValue(r.charAt(r.length() - 1));
  int numericValue2=Character.getNumericValue(r.charAt(r.length() - 2));
  int combined=Integer.valueOf(numericValue2 + "" + numericValue1);
  r=r.replaceAll("E[0-9][0-9]",SUFFIX[combined / 3]);
  while (r.length() > MAX_LENGTH || r.matches("[0-9]+\\.[a-z]")) {
    r=r.substring(0,r.length() - 2) + r.substring(r.length() - 1);
  }
  return r;
}

private String makePretty ( double number ) { String r = mFormattedStringCache . getFormattedValue ( number ) ; int numericValue1 = Character . getNumericValue ( r . charAt ( r . length ( ) - 1 ) ) ; int numericValue2 = Character . getNumericValue ( r . charAt ( r . length ( ) - 2 ) ) ; int combined = Integer . valueOf ( numericValue2 + "" + numericValue1 ) ; r = r . replaceAll ( "E[0-9][0-9]" , SUFFIX [ combined / 3 ] ) ; while ( r . length ( ) > MAX_LENGTH || r . matches ( "[0-9]+\\.[a-z]" ) ) { r = r . substring ( 0 , r . length ( ) - 2 ) + r . substring ( r . length ( ) - 1 ) ; } return r ; }
formats each number properly . special thanks to roman gromov ( https : / / github . com / romangromov ) for this piece of code .
