Skip to main content
1

🛠️ Formatting

thousandNumberFormat
String
Applies thousand separators to a numeric string based on the default system locale (intl required). Handles non-numeric input safely by returning “0”.
final amountString = '10000000';
print(amountString.thousandNumberFormat); // "10,000,000"
cleanNumbers
String
Removes all commas (,) from the string. Essential for sanitizing user input before parsing it as a number.
final messyString = '10,000,000.50';
print(messyString.cleanNumbers); // "10000000.50"

🛠️ Formatting