File tree Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ void TestString (void)
1313 static const char c_TestString2[] = " abcdefghijklmnopqrstuvwxyz" ;
1414 static const char c_TestString3[] = " ABCDEFGHIJKLMNOPQRSTUVWXYZ" ;
1515 string s1 (c_TestString1);
16- string s2 (VectorRange (c_TestString2));
16+ string s2 (VectorRange (c_TestString2)- 1 );
1717 string s3 (s1);
1818
1919 cout << s1 << endl;
Original file line number Diff line number Diff line change @@ -65,8 +65,6 @@ void string::assign (const_pointer s)
6565// / Assigns itself the value of string \p s of length \p len.
6666void string::assign (const_pointer s, size_type len)
6767{
68- while (len && s[len - 1 ] == 0 )
69- -- len;
7068 resize (len);
7169 copy_n (s, len, begin ());
7270}
@@ -81,8 +79,6 @@ void string::append (const_pointer s)
8179// / Appends to itself the value of string \p s of length \p len.
8280void string::append (const_pointer s, size_type len)
8381{
84- while (len && s[len - 1 ] == 0 )
85- -- len;
8682 resize (size () + len);
8783 copy_n (s, len, end () - len);
8884}
You can’t perform that action at this time.
0 commit comments