Use three zero places max

This commit is contained in:
Christoph Atteneder 2018-02-19 10:08:07 +01:00
parent ab3903d98d
commit ff7e527ab8
No known key found for this signature in database
GPG key ID: CD5DC1C529CDFD3B
2 changed files with 6 additions and 1 deletions

View file

@ -9,7 +9,7 @@ public class ColoredDecimalPlacesWithZerosText extends TextFlow {
public ColoredDecimalPlacesWithZerosText(String number) {
super();
String placesBeforeZero = number.split("0*$")[0];
String placesBeforeZero = number.split("0{1,3}$")[0];
String zeroDecimalPlaces = number.substring(placesBeforeZero.length());
Text first = new Text(placesBeforeZero);
Text last = new Text(zeroDecimalPlaces);

View file

@ -0,0 +1,5 @@
package io.bisq.gui.components;
public class ColoredDecimalPlacesWithZerosTextTest {
}