Romasmi / cpp-practice

0 stars 0 forks source link

Замечания по HTML Decode #7

Closed alexey-malov closed 5 years ago

alexey-malov commented 6 years ago
string StringReplace(const string& line, const string& search, const string& replace)
{
    string newString(line);
    size_t position = newString.find(search, 0);
    while (position != string::npos)
    {
        newString.replace(position, search.length(), replace);
        position += replace.length();
        position = newString.find(search, position);
    }
    return newString;
}
alexey-malov commented 6 years ago
alexey-malov commented 6 years ago

image

alexey-malov commented 6 years ago

image

alexey-malov commented 6 years ago

image

alexey-malov commented 6 years ago

Используйте расширение OpenCppCoverage для VisualStudio, чтобы обнаруживать строки, которые никогда не выполнялись

alexey-malov commented 6 years ago