summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-04-23 07:17:13 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-04-23 07:17:13 +0000
commitb962a9cd6553fc816a61f4ff17b68445a84dabb2 (patch)
tree3f0fe53e9a53b483a9fc8b961bcce2bc812b7711 /plugins
parent6c5f47e21ef20a586ca2e9732d167a6d7b72679f (diff)
more changes for string functions
git-svn-id: http://svn.miranda-ng.org/main/trunk@13049 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NewsAggregator/Src/Utils.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp
index 26d17c22a0..ffcb2ec955 100644
--- a/plugins/NewsAggregator/Src/Utils.cpp
+++ b/plugins/NewsAggregator/Src/Utils.cpp
@@ -289,7 +289,7 @@ TCHAR * _tcsistr(const TCHAR *str, const TCHAR *substr)
if (!str || !substr || (substr[0] == _T('\0')))
return (TCHAR *)str;
- size_t nLen = _tcslen(substr);
+ size_t nLen = mir_tstrlen(substr);
while (*str)
{
if (_tcsnicmp(str, substr, nLen) == 0)
@@ -308,15 +308,15 @@ int StrReplace(TCHAR *lpszOld, const TCHAR *lpszNew, TCHAR *&lpszStr)
if (!lpszStr || !lpszOld || !lpszNew)
return 0;
- size_t nStrLen = _tcslen(lpszStr);
+ size_t nStrLen = mir_tstrlen(lpszStr);
if (nStrLen == 0)
return 0;
- size_t nOldLen = _tcslen(lpszOld);
+ size_t nOldLen = mir_tstrlen(lpszOld);
if (nOldLen == 0)
return 0;
- size_t nNewLen = _tcslen(lpszNew);
+ size_t nNewLen = mir_tstrlen(lpszNew);
// loop once to figure out the size of the result string
size_t nCount = 0;
@@ -330,7 +330,7 @@ int StrReplace(TCHAR *lpszOld, const TCHAR *lpszNew, TCHAR *&lpszStr)
nCount++;
pszStart = pszTarget + nOldLen;
}
- pszStart += _tcslen(pszStart);
+ pszStart += mir_tstrlen(pszStart);
}
// if any changes, make them now
@@ -348,18 +348,18 @@ int StrReplace(TCHAR *lpszOld, const TCHAR *lpszNew, TCHAR *&lpszStr)
while (pszStart < pszEnd) {
while ((pszTarget = _tcsistr(pszStart, lpszOld)) != NULL) {
size_t nCopyLen = (size_t)(pszTarget - pszStart);
- _tcsncpy(cp, &lpszStr[pszStart - lpszStr], nCopyLen);
+ mir_tstrncpy(cp, &lpszStr[pszStart - lpszStr], nCopyLen);
cp += nCopyLen;
pszStart = pszTarget + nOldLen;
- _tcscpy(cp, lpszNew);
+ mir_tstrcpy(cp, lpszNew);
cp += nNewLen;
}
- _tcscpy(cp, pszStart);
- pszStart += _tcslen(pszStart);
+ mir_tstrcpy(cp, pszStart);
+ pszStart += mir_tstrlen(pszStart);
}
if (pszResultStr)
@@ -368,7 +368,7 @@ int StrReplace(TCHAR *lpszOld, const TCHAR *lpszNew, TCHAR *&lpszStr)
int nSize = 0;
if (pszResultStr) {
- nSize = (int)_tcslen(pszResultStr);
+ nSize = (int)mir_tstrlen(pszResultStr);
delete[] pszResultStr;
}