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.

example/trim_zero_example.dart

import 'package:trim_zero/trim_zero.dart';

void main() {
  print('0.010'.trimZero()); // 0.01

  double price = 99.00;
  print(price.toString().trimZero()); // 99
}
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