atr_val.pop_back();atr_val.pop_back();atr_val=atr_val.substr(1);insert_attr(atr_name,atr_val); code example
Example: remove last character from string c++
st = myString.substr(0, myString.size()-1);
st = myString.substr(0, myString.size()-1);