trim_zero 1.0.0 copy "trim_zero: ^1.0.0" to clipboard
trim_zero: ^1.0.0 copied to clipboard

Remove trailing 0 for Dart number string, gives you a pretty number or price.

Dart CI pub package package publisher

A Dart library that removes trailing zeros from the end of a number string and gives you a nicely formatted number string.

Usage #

print('0.010'.trimZero()); // 0.01

double price = 99.00;
print(price.toString().trimZero()); // 99

Development Guide #

1
likes
150
points
7
downloads

Publisher

verified publishermihouse.tech

Weekly Downloads

Remove trailing 0 for Dart number string, gives you a pretty number or price.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on trim_zero