[Formatting] Fix issue with unexpected leading space

This commit is contained in:
Ton Huisman
2022-01-21 21:26:45 +01:00
parent 69875807f6
commit aec20efc72
+1
View File
@@ -244,6 +244,7 @@ String toString(const float& value, uint8_t decimals)
String doubleToString(const double& value, int decimals, bool trimTrailingZeros) {
String res(value, decimals);
res.trim();
if (trimTrailingZeros) {
int dot_pos = res.lastIndexOf('.');
if (dot_pos != -1) {