File tree Expand file tree Collapse file tree 4 files changed +14
-0
lines changed Expand file tree Collapse file tree 4 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,12 @@ String::String(const char *cstr)
3131 if (cstr) copy (cstr, strlen (cstr));
3232}
3333
34+ String::String (const char *cstr, unsigned int length)
35+ {
36+ init ();
37+ if (cstr) copy (cstr, length);
38+ }
39+
3440String::String (const String &value)
3541{
3642 init ();
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ class String
5757 // fails, the string will be marked as invalid (i.e. "if (s)" will
5858 // be false).
5959 String (const char *cstr = " " );
60+ String (const char *cstr, unsigned int length);
6061 String (const String &str);
6162 String (const __FlashStringHelper *str);
6263 #ifdef __GXX_EXPERIMENTAL_CXX0X__
Original file line number Diff line number Diff line change @@ -33,6 +33,12 @@ String::String(const char *cstr)
3333 if (cstr) copy (cstr, strlen (cstr));
3434}
3535
36+ String::String (const char *cstr, unsigned int length)
37+ {
38+ init ();
39+ if (cstr) copy (cstr, length);
40+ }
41+
3642String::String (const String &value)
3743{
3844 init ();
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ class String
5757 // fails, the string will be marked as invalid (i.e. "if (s)" will
5858 // be false).
5959 String (const char *cstr = " " );
60+ String (const char *cstr, unsigned int length);
6061 String (const String &str);
6162 String (const __FlashStringHelper *str);
6263 #ifdef __GXX_EXPERIMENTAL_CXX0X__
You can’t perform that action at this time.
0 commit comments