Example of Substring Operations
string strA = "123456789";
strB = strA.substr(2,3); // value is "345"
strC = strA.substr(2); // value is "3456789"
string strD = "123456789";
strD.erase(3,5); // value is "1239"
strD.erase(2); // value is "12"
strD.erase(); // value is ""
string strE = "12345";
string in = "abcde";
strE.insert(2,in); // value is "12abcde345"
strE = "12345";
strE.insert(3,in,1,3); // value is "123bcd45"
strE = "12345";
strE.insert(2,"UVWXYZ",3); // value is "12UVW345"
strE = "12345";
strE.insert(4,"Boo"); // value is "1234Boo5"
strE = "12345";
strE.insert(1,3,'x'); // value is "1xxx2345"
strE = "12345";
in = "abcde";
strE.replace(1,2,in); // value is "1abcde45"
strE = "12345";
strE.replace(1,2,in,3,2); // value is "1de45"
strE = "12345";
strE.replace(1,2,"stuv",2); // value is "1st45"
strE = "12345";
strE.replace(1,2,"stuv"); // value is "1stuv45"
strE = "12345";
strE.replace(1,2,3,'B'); // value is "1BBB45"