From 51fa5a6cac595756e93116f29e8f15a4f426d95b Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Fri, 28 Feb 2025 23:07:37 +0300 Subject: [PATCH] Simplify and fix code --- gazebo/Arduino.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/gazebo/Arduino.h b/gazebo/Arduino.h index 5674cfb..f443ae9 100644 --- a/gazebo/Arduino.h +++ b/gazebo/Arduino.h @@ -33,17 +33,9 @@ class __FlashStringHelper; // https://www.arduino.cc/reference/en/language/variables/data-types/stringobject/ class String: public std::string { public: - String(const char *str = "") : std::string(str ? str : "") {} long toInt() const { return atol(this->c_str()); } float toFloat() const { return atof(this->c_str()); } bool isEmpty() const { return this->empty(); } - void toCharArray(char *buf, unsigned int bufsize, unsigned int index = 0) const { - strlcpy(buf, this->c_str() + index, bufsize); - } - void trim() { - this->erase(0, this->find_first_not_of(" \t\n\r")); - this->erase(this->find_last_not_of(" \t\n\r") + 1); - } }; class Print;