aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2013-03-10 23:03:25 +0100
committerCristian Maglie <c.maglie@bug.st>2013-03-10 23:03:25 +0100
commit399d9c58a2777aef3b53fb4860cb8bf4252a1598 (patch)
treee8a59f2b6f1aa38e28d3b9e94335398cc2305bba /cores/arduino
parentcc8291eda8e87f8d8be5868fe51bf3b2c76be398 (diff)
Revert "Added function on WString class to export char ptr"
This reverts commit a0c96bebddac27e8ea51811a74d6cdfa2d8a30e0.
Diffstat (limited to 'cores/arduino')
-rwxr-xr-xcores/arduino/Print.cpp7
-rw-r--r--cores/arduino/WString.cpp4
-rw-r--r--cores/arduino/WString.h1
3 files changed, 5 insertions, 7 deletions
diff --git a/cores/arduino/Print.cpp b/cores/arduino/Print.cpp
index e087313..53961ec 100755
--- a/cores/arduino/Print.cpp
+++ b/cores/arduino/Print.cpp
@@ -53,8 +53,11 @@ size_t Print::print(const __FlashStringHelper *ifsh)
size_t Print::print(const String &s)
{
- write((const uint8_t*)s.c_str(), s.length());
- return s.length();
+ size_t n = 0;
+ for (uint16_t i = 0; i < s.length(); i++) {
+ n += write(s[i]);
+ }
+ return n;
}
size_t Print::print(const char str[])
diff --git a/cores/arduino/WString.cpp b/cores/arduino/WString.cpp
index d05037b..c6839fc 100644
--- a/cores/arduino/WString.cpp
+++ b/cores/arduino/WString.cpp
@@ -642,8 +642,4 @@ long String::toInt(void) const
return 0;
}
-char* String::c_str() const
-{
- return buffer;
-}
diff --git a/cores/arduino/WString.h b/cores/arduino/WString.h
index ec6cead..947325e 100644
--- a/cores/arduino/WString.h
+++ b/cores/arduino/WString.h
@@ -169,7 +169,6 @@ public:
// parsing/conversion
long toInt(void) const;
- char* c_str() const;
protected:
char *buffer; // the actual char array