public static String format(String s,String col){
  String s1=(s + padd);
  return s1.substring(0,Math.min(col.length(),s1.length()));
}

public static String format ( String s , String col ) { String s1 = ( s + padd ) ; return s1 . substring ( 0 , Math . min ( col . length ( ) , s1 . length ( ) ) ) ; }
pad a string from right .
