如果我有 : Enter(x)
我想放在(word之后room2,但没有x, 那么 std::insert 没有帮助,因为 if :
std::string myString = "Enter(x)";
std::string placeMe = "room2";
myString.insert(myString.find_first_of("(") + 1 , placeMe);
然后我会得到:Enter(room2x)。
如何放置placeMe 而不是某个索引?