From b4b32f60f1c156e76117dab69479c193a861be23 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Fri, 11 Mar 2011 18:54:58 -0500 Subject: Don't return the string when modifying its value. Changing toLowerCase(), toUpperCase(), trim() and replace() to return void instead of a reference to the string that's just been changed. That way, it's clear that the functions modify the string they've been called on. --- cores/arduino/WString.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cores/arduino/WString.h') diff --git a/cores/arduino/WString.h b/cores/arduino/WString.h index 4a680e2..164eeac 100644 --- a/cores/arduino/WString.h +++ b/cores/arduino/WString.h @@ -139,11 +139,11 @@ public: String substring( unsigned int beginIndex, unsigned int endIndex ) const; // modification - String & replace(char find, char replace); - String & replace(const String& find, const String& replace); - String & toLowerCase(void); - String & toUpperCase(void); - String & trim(void); + void replace(char find, char replace); + void replace(const String& find, const String& replace); + void toLowerCase(void); + void toUpperCase(void); + void trim(void); // parsing/conversion long toInt(void) const; -- cgit v1.2.3-18-g5258