I want to align the number in a string as follows:
3 x 89 kg 3 x 133 kg
I use this format:
String.format("%1$3d x %2$3d kg", nb, weight);
But the result is incorrect:
This is due to the font (because the characters do not have the same width). Change the font to a monospace font and the problem will be solved (I recommend Console for this)
Source: https://habr.com/ru/post/1607076/More articles:mysql2 0.4.0 ruby gem requires an error - ruby | fooobar.comSupervisor Will Not Start Automatically When Ubuntu Server Boots - ubuntuAndroid nullpointerexception in ActionBarDrawerToggle.syncState () - androidCannot call "responseObject" using an argument list of type (("WeatherResponse ?, NSError?") -> Void - iosDeamine enumeration using @JsonCreator using factory method - javaUWP UnauthorizedException - c #CodeIgniter select request date difference - phpJavascript V8 object link size - javascriptContour path of an image / silhouette in Swift - iosEclipse web.xml Reference file error - javaAll Articles