| OLD | NEW |
| 1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
| 2 #include <algorithm> | 2 #include <algorithm> |
| 3 #include <stdexcept> | 3 #include <stdexcept> |
| 4 #include <vector> | 4 #include <vector> |
| 5 | 5 |
| 6 #include "../shared/Utils.h" | 6 #include "../shared/Utils.h" |
| 7 #include "PluginUtil.h" | 7 #include "PluginUtil.h" |
| 8 #include "PluginSettings.h" | 8 #include "PluginSettings.h" |
| 9 | 9 |
| 10 BString::BString(const std::wstring& value) | 10 BString::BString(const std::wstring& value) |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 } | 45 } |
| 46 | 46 |
| 47 CString ExtractDomain(const CString& url) | 47 CString ExtractDomain(const CString& url) |
| 48 { | 48 { |
| 49 int pos = 0; | 49 int pos = 0; |
| 50 if (url.Find('/', pos) >= 0) | 50 if (url.Find('/', pos) >= 0) |
| 51 url.Tokenize(L"/", pos); | 51 url.Tokenize(L"/", pos); |
| 52 CString domain = url.Tokenize(L"/", pos); | 52 CString domain = url.Tokenize(L"/", pos); |
| 53 domain.MakeLower(); | 53 domain.MakeLower(); |
| 54 return domain; | 54 return domain; |
| 55 } | |
| 56 | |
| 57 void ReplaceString(std::wstring& input, const std::wstring placeholder, const st
d::wstring replacement) | |
| 58 { | |
| 59 size_t replaceStart = input.find(placeholder); | |
| 60 if (replaceStart != std::string::npos) | |
| 61 { | |
| 62 input.replace(replaceStart, placeholder.length(), replacement); | |
| 63 } | |
| 64 } | 55 } |
| OLD | NEW |