File tree 4 files changed +14
-0
lines changed
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)
31
31
if (cstr) copy (cstr, strlen (cstr));
32
32
}
33
33
34
+ String::String (const char *cstr, unsigned int length)
35
+ {
36
+ init ();
37
+ if (cstr) copy (cstr, length);
38
+ }
39
+
34
40
String::String (const String &value)
35
41
{
36
42
init ();
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ class String
57
57
// fails, the string will be marked as invalid (i.e. "if (s)" will
58
58
// be false).
59
59
String (const char *cstr = " " );
60
+ String (const char *cstr, unsigned int length);
60
61
String (const String &str);
61
62
String (const __FlashStringHelper *str);
62
63
#ifdef __GXX_EXPERIMENTAL_CXX0X__
Original file line number Diff line number Diff line change @@ -33,6 +33,12 @@ String::String(const char *cstr)
33
33
if (cstr) copy (cstr, strlen (cstr));
34
34
}
35
35
36
+ String::String (const char *cstr, unsigned int length)
37
+ {
38
+ init ();
39
+ if (cstr) copy (cstr, length);
40
+ }
41
+
36
42
String::String (const String &value)
37
43
{
38
44
init ();
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ class String
57
57
// fails, the string will be marked as invalid (i.e. "if (s)" will
58
58
// be false).
59
59
String (const char *cstr = " " );
60
+ String (const char *cstr, unsigned int length);
60
61
String (const String &str);
61
62
String (const __FlashStringHelper *str);
62
63
#ifdef __GXX_EXPERIMENTAL_CXX0X__
You can’t perform that action at this time.
0 commit comments