aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/Print.cpp
diff options
context:
space:
mode:
authorMimmo La Fauci <mlafauci@metodo2.it>2013-02-08 19:21:46 +0100
committerMimmo La Fauci <mlafauci@metodo2.it>2013-02-08 19:21:46 +0100
commitfb1abe737ed23c57a3208d603933dd68138ad022 (patch)
tree524df5142c6566dd19a0d05c40b37c16705cec06 /cores/arduino/Print.cpp
parent09b755fb9c3f5c42fa9b38ffeef0dbfa2cfd8315 (diff)
Added function on WString class to export char ptr
Diffstat (limited to 'cores/arduino/Print.cpp')
-rwxr-xr-xcores/arduino/Print.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/cores/arduino/Print.cpp b/cores/arduino/Print.cpp
index 53961ec..e087313 100755
--- a/cores/arduino/Print.cpp
+++ b/cores/arduino/Print.cpp
@@ -53,11 +53,8 @@ size_t Print::print(const __FlashStringHelper *ifsh)
size_t Print::print(const String &s)
{
- size_t n = 0;
- for (uint16_t i = 0; i < s.length(); i++) {
- n += write(s[i]);
- }
- return n;
+ write((const uint8_t*)s.c_str(), s.length());
+ return s.length();
}
size_t Print::print(const char str[])