Fixed a bug in the 01.cpp

This commit is contained in:
2023-12-06 09:51:41 +01:00
parent b7c3a30691
commit 3327e4a2d9

@ -26,7 +26,7 @@ int main() {
size_t index = current_str.find(item.second);
while(index != std::string::npos){
current_str.replace(index, item.second.length(), item.first);
current_str.replace(index, item.second.length() - 1, item.first);
index = current_str.find(item.second);
}
}