diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/std_string_utils.cpp | 10 | ||||
-rw-r--r-- | utils/std_string_utils.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/utils/std_string_utils.cpp b/utils/std_string_utils.cpp index dc763524f3..49cda52844 100644 --- a/utils/std_string_utils.cpp +++ b/utils/std_string_utils.cpp @@ -387,19 +387,19 @@ std::string utils::text::source_get_form_data(std::string* data, bool hiddenOnly return values; } -std::wstring utils::text::prepare_name(const std::wstring &name, bool withSurnameLetter) +std::string utils::text::prepare_name(const std::string &name, bool withSurnameLetter) { - std::wstring::size_type pos = name.find(L" "); + std::string::size_type pos = name.find(" "); if (pos == std::wstring::npos) return name; - std::wstring result = name.substr(0, pos); + std::string 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 + pos = name.rfind(" ") + 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::wstring(L"."); + result += " " + name.substr(pos, 1) + std::string("."); } return result; diff --git a/utils/std_string_utils.h b/utils/std_string_utils.h index 96ee5ca4d9..2c72e3a918 100644 --- a/utils/std_string_utils.h +++ b/utils/std_string_utils.h @@ -76,7 +76,7 @@ namespace utils std::string truncate_utf8(const std::string &text, size_t maxLength);
void explode(std::string str, const std::string &separator, std::vector<std::string>* results);
void append_ordinal(unsigned long value, std::string* data);
- std::wstring prepare_name(const std::wstring &name, bool withSurnameLetter);
+ std::string prepare_name(const std::string &name, bool withSurnameLetter);
};
namespace conversion
|