Answers for "how can we access two characters from a string in cpp"

C++
0

c++ get string between two characters

string str = "STARTDELIMITER_0_192.168.1.18_STOPDELIMITER";
unsigned first = str.find(STARTDELIMITER);
unsigned last = str.find_last_of(STOPDELIMITER);
string strNew = str.substr (first,last-first);
std::cout << strNew << std::endl;
Posted by: Guest on May-09-2021

Code answers related to "how can we access two characters from a string in cpp"

Browse Popular Code Answers by Language