Automatically double ampersands in the name attribute
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7131 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
2bae3414ba
commit
52cd125973
6 changed files with 19 additions and 3 deletions
|
@ -880,6 +880,16 @@ bool IsWindowsPathRelative(const TCHAR *p)
|
|||
return PathGetDosDriveNumber(p) < 0;
|
||||
}
|
||||
|
||||
tstring replace_all(const TCHAR *str, const TCHAR *find, const TCHAR *repl)
|
||||
{
|
||||
tstring out = str;
|
||||
for (size_t cchF = _tcslen(find), cchR = _tcslen(repl), i = 0; ; i += cchR)
|
||||
if ((i = out.find(find, i)) == tstring::npos)
|
||||
return out;
|
||||
else
|
||||
out.replace(i, cchF, repl);
|
||||
}
|
||||
|
||||
struct ToLower
|
||||
{
|
||||
TCHAR operator() (TCHAR c) const { return _totlower(c); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue