Skip to content

Commit 19e4d38

Browse files
committed
Added c_str() method to String class.
1 parent 99f2a27 commit 19e4d38

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

hardware/arduino/cores/arduino/WString.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ class String
147147
void getBytes(unsigned char *buf, unsigned int bufsize, unsigned int index=0) const;
148148
void toCharArray(char *buf, unsigned int bufsize, unsigned int index=0) const
149149
{getBytes((unsigned char *)buf, bufsize, index);}
150+
char* c_str() const { return buffer; }
150151

151152
// search
152153
int indexOf( char ch ) const;

0 commit comments

Comments
 (0)