Skip to content

Strings without null-termination #97

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

Merged
merged 9 commits into from
Jan 25, 2021
Prev Previous commit
Next Next commit
Add String(const uint8_t *, unsigned int) constructor
This allows creating a String from a uint8_t[] or uint8_t* as well,
without having to add explicit casts.
  • Loading branch information
matthijskooijman committed Jan 25, 2021
commit 0d83f1afc3367037dbde5323c2abd0ae1bd2c583
1 change: 1 addition & 0 deletions api/String.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class String
// be false).
String(const char *cstr = "");
String(const char *cstr, unsigned int length);
String(const uint8_t *cstr, unsigned int length) : String((const char*)cstr, length) {}
String(const String &str);
String(const __FlashStringHelper *str);
#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
Expand Down