From 1bc1e8c6028503cd98927c9d7b19d447a3988e27 Mon Sep 17 00:00:00 2001 From: Terry J Myers Date: Mon, 19 Nov 2018 10:45:09 -0500 Subject: [PATCH] Update WString.cpp (#1936) --- cores/esp32/WString.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cores/esp32/WString.cpp b/cores/esp32/WString.cpp index 5cfb2983..eb8509da 100644 --- a/cores/esp32/WString.cpp +++ b/cores/esp32/WString.cpp @@ -882,6 +882,12 @@ float String::toFloat(void) const return 0; } +double String::toDouble(void) const { + if (buffer) { + return atof(buffer); + } + return 0; +} unsigned char String::equalsConstantTime(const String &s2) const { // To avoid possible time-based attacks present function