update cartion editor for package
This commit is contained in:
@@ -395,3 +395,12 @@ bool hasUnicode(String text) {
|
||||
text.codeUnits.where((ch) => ch > maxBits).toList();
|
||||
return unicodeSymbols.length > 0;
|
||||
}
|
||||
|
||||
|
||||
String removeTrailingZeros(double number) {
|
||||
String result = number.toString();
|
||||
result = result.indexOf('.') > 0
|
||||
? result.replaceAll(RegExp(r"([.]*0)(?!.*\d)"), "")
|
||||
: result;
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user