• Daniel Pfeifer's avatar
    Use std::replace for replacing chars in strings. · 5cec953e
    Daniel Pfeifer authored
    Find uses of `cmSystemTools::ReplaceString` where both `replace` and
    `with` are string literals with a size of one.
    
    Automate with:
    
    git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\(.\)\", \"\(.\)\");|std::replace(\1.begin(), \1.end(), '\2', '\3');|g"
    git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\(.\)\", \"\\\\\\\\\");|std::replace(\1.begin(), \1.end(), '\2', '\\\\\\\\');|g"
    git grep -l ReplaceString | xargs sed -i "s|cmSystemTools::ReplaceString(\([^,]*\), \"\\\\\\\\\", \"\(.\)\");|std::replace(\1.begin(), \1.end(), '\\\\\\\\', '\2');|g"
    5cec953e
cmVisualStudioWCEPlatformParser.cxx 4.48 KB