Answers for "splice string in c++"

C++
1

splice string in c++

string str1 = "Apples are red";
string str2 = str1.substr(11, 3); // "red"
string str3 = str1.substr(0, 6); // "Apples"
Posted by: Guest on September-14-2020

Browse Popular Code Answers by Language