From 2719777a48418210563bf58199331eefe24969af Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 6 Jun 2013 15:37:04 +0200 Subject: String class: removed deep copy on substring method. Small code cleanup. --- cores/arduino/WString.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cores/arduino/WString.h') diff --git a/cores/arduino/WString.h b/cores/arduino/WString.h index 642b016..8938bf9 100644 --- a/cores/arduino/WString.h +++ b/cores/arduino/WString.h @@ -158,7 +158,7 @@ public: int lastIndexOf( char ch, unsigned int fromIndex ) const; int lastIndexOf( const String &str ) const; int lastIndexOf( const String &str, unsigned int fromIndex ) const; - String substring( unsigned int beginIndex ) const; + String substring( unsigned int beginIndex ) const { return substring(beginIndex, len); }; String substring( unsigned int beginIndex, unsigned int endIndex ) const; // modification -- cgit v1.2.3-18-g5258