Skip to content

Update Format in BoostGui.java#16

Open
KikoLa663 wants to merge 1 commit intoez-plugins:mainfrom
KikoLa663:main
Open

Update Format in BoostGui.java#16
KikoLa663 wants to merge 1 commit intoez-plugins:mainfrom
KikoLa663:main

Conversation

@KikoLa663
Copy link

Format now displays numbers needing commas with them and handles decimal points as well. Example:
1234.5 >>1,234.5
12345>>12,345

Format now displays numbers needing commas with them and handles decimal points as well. 
Example:
1234.5 >>1,234.5
12345>>12,345
@ez-plugins
Copy link
Owner

ez-plugins commented Feb 6, 2026

Hi @KikoLa663 thank you for your pull request. I have reviewed the code and requested a few changes. Can have combined configuration option with #14 for combined format.

Comment on lines +174 to 181
/* private String formatCost(double cost) {
if (cost <= 0.0) {
return "Free";
}
if (cost == Math.floor(cost)) {
return String.valueOf((int) cost);
}
return String.format(Locale.US, "%.2f", cost);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed

string=String.valueOf(cost);
}

String patternString = "(?=(?!^)\\d{3}(?:\\b|(?:\\d{3})+)\\b)";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting should be optional through configuration option here, is for full GUI

@ez-plugins
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants