Skip to content
Snippets Groups Projects
Commit 5cec953e authored by Daniel Pfeifer's avatar Daniel Pfeifer
Browse files

Use std::replace for replacing chars in strings.

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"
parent 2a1a2033
No related branches found
No related tags found
No related merge requests found
Showing
with 36 additions and 36 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment