Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

WString.h: Add const qualifier to begin and end functions #4945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
WString.h: Add const qualifier to begin and end functions
  • Loading branch information
Ivan-Perez committed May 12, 2016
commit d64f8eb570177966eea89e1993348f105ec05c21
6 changes: 3 additions & 3 deletions 6 hardware/arduino/avr/cores/arduino/WString.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ class String
void getBytes(unsigned char *buf, unsigned int bufsize, unsigned int index=0) const;
void toCharArray(char *buf, unsigned int bufsize, unsigned int index=0) const
{getBytes((unsigned char *)buf, bufsize, index);}
const char * c_str() const { return buffer; }
const char* begin() { return c_str(); }
const char* end() { return c_str() + length(); }
const char* c_str() const { return buffer; }
const char* begin() const { return c_str(); }
const char* end() const { return c_str() + length(); }

// search
int indexOf( char ch ) const;
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.