summaryrefslogtreecommitdiff
path: root/utils/std_string_utils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-26 09:20:25 +0000
commit6e53dfca72b932c4bdcd7aa02ca62bf8b2630eac (patch)
tree2e8bb660c908b54914abd562af8aafa4a486c846 /utils/std_string_utils.cpp
parenta61c8728b379057fe7f0a0d86fe0b037598229dd (diff)
less TCHARs:
- TCHAR is replaced with wchar_t everywhere; - LPGENT replaced with either LPGENW or LPGEN; - fixes for ANSI plugins that improperly used _t functions; - TCHAR *t removed from MAllStrings; - ptszGroup, ptszTitle & ptszTab in OPTIONSDIALOGPAGE replaced with pwsz* git-svn-id: http://svn.miranda-ng.org/main/trunk@17133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'utils/std_string_utils.cpp')
-rw-r--r--utils/std_string_utils.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/utils/std_string_utils.cpp b/utils/std_string_utils.cpp
index 5991106b45..7a1e6b61b9 100644
--- a/utils/std_string_utils.cpp
+++ b/utils/std_string_utils.cpp
@@ -112,11 +112,11 @@ void utils::text::replace_all(std::string* data, const std::string &from, const
}
}
-void utils::text::treplace_all(std::tstring* data, const std::tstring &from, const std::tstring &to)
+void utils::text::treplace_all(std::wstring* data, const std::wstring &from, const std::wstring &to)
{
- std::tstring::size_type position = 0;
+ std::wstring::size_type position = 0;
- while ((position = data->find(from, position)) != std::tstring::npos)
+ while ((position = data->find(from, position)) != std::wstring::npos)
{
data->replace(position, from.size(), to);
position++;
@@ -379,19 +379,19 @@ std::string utils::text::source_get_form_data(std::string* data, boolean hiddenO
return values;
}
-std::tstring utils::text::prepare_name(const std::tstring &name, bool withSurnameLetter)
+std::wstring utils::text::prepare_name(const std::wstring &name, bool withSurnameLetter)
{
- std::tstring::size_type pos = name.find(L" ");
- if (pos == std::tstring::npos)
+ std::wstring::size_type pos = name.find(L" ");
+ if (pos == std::wstring::npos)
return name;
- std::tstring result = name.substr(0, pos);
+ std::wstring result = name.substr(0, pos);
if (withSurnameLetter) {
pos = name.rfind(L" ") + 1; // we're sure there is some space in name so we can do +1 safely
if (pos < name.length())
- result += L" " + name.substr(pos, 1) + std::tstring(L".");
+ result += L" " + name.substr(pos, 1) + std::wstring(L".");
}
return result;