mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-28 04:07:47 +00:00
Merge pull request #3923 from tonhuisman/bugfix/numeric-formatting-unexpected-leading-space
[Formatting] Fix issue with unexpected leading space
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user