string str1 = "Apples are red";
string str2 = str1.substr(11, 3); // "red"
string str3 = str1.substr(0, 6); // "Apples"
Code Example |
---|
Cpp :: iterate over 2 vectors c++ |
Cpp :: double to int c++ |
Cpp :: clear the input buffer in cpp |
Cpp :: c++ program transpose of matrix |
Cpp :: c++ vector extend vector |
Cpp :: string to int c++ |
Cpp :: c++ load file as vector |
Cpp :: c++ check palindrome |
Cpp :: c++ vector size |
Cpp :: size of stack in c++ |
Cpp :: hello world program in c++ |
Cpp :: priority queue c++ |
Cpp :: deque c++ |
Cpp :: c++ pi float |
Cpp :: how to reverse a vector |
Cpp :: continue statement in c++ program |
Cpp :: initialize string with length c++ |
Cpp :: prisma client |
Cpp :: See Compilation Time in c++ Program |
Cpp :: find kth max and min element in an array |
Cpp :: last character of std::string |
Cpp :: stack overflow c++ |
Cpp :: power of a number |
Cpp :: c++ base constructor |
Cpp :: double to float c++ |
Cpp :: hello c++ |
Cpp :: convert char to int c++ |
Cpp :: initialize vector |
Cpp :: length of a string c++ |
Cpp :: resize vector c++ |