summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Skype/src/skype_utils.cpp')
-rw-r--r--protocols/Skype/src/skype_utils.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/protocols/Skype/src/skype_utils.cpp b/protocols/Skype/src/skype_utils.cpp
index 10203a3577..9af8c5b5cf 100644
--- a/protocols/Skype/src/skype_utils.cpp
+++ b/protocols/Skype/src/skype_utils.cpp
@@ -551,4 +551,15 @@ void CSkypeProto::CopyToClipboard(const wchar_t *text)
::GlobalUnlock(hMem);
::SetClipboardData(CF_UNICODETEXT, hMem);
::CloseClipboard();
+}
+
+void CSkypeProto::ReplaceSpecialChars(wchar_t *text, wchar_t replaceWith)
+{
+ if (text == NULL)
+ return;
+
+ wchar_t *special = L"\\/:*?\"<>|";
+ for (size_t i = 0; i < ::wcslen(text); i++)
+ if (::wcschr(special, text[i]) != NULL)
+ text[i] = replaceWith;
} \ No newline at end of file