diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-07-30 23:29:59 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-07-30 23:29:59 +0000 |
commit | 3bdff57b5868e9d333f61297021f7943ed160500 (patch) | |
tree | a2514a7aafecf82d7900371a8550769d6f0bf7af /protocols/Omegle/src/utils.cpp | |
parent | 548bcad3fa31c55c33200c3516a5a537ca5e3f0d (diff) |
Omegle: Fix sending and receiving % in chats
git-svn-id: http://svn.miranda-ng.org/main/trunk@10002 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Omegle/src/utils.cpp')
-rw-r--r-- | protocols/Omegle/src/utils.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/protocols/Omegle/src/utils.cpp b/protocols/Omegle/src/utils.cpp index fcc45aa502..bc7bac240a 100644 --- a/protocols/Omegle/src/utils.cpp +++ b/protocols/Omegle/src/utils.cpp @@ -49,6 +49,18 @@ void utils::text::replace_all( std::string* data, std::string from, std::string }
}
+void utils::text::treplace_all(std::tstring* data, std::tstring from, std::tstring to)
+{
+ std::tstring::size_type position = 0;
+
+ while ((position = data->find(from, position)) != std::tstring::npos)
+ {
+ data->replace(position, from.size(), to);
+ position++;
+ }
+}
+
+
std::string utils::text::special_expressions_decode( std::string data )
{
utils::text::replace_all( &data, "\\r", "\r" );
|