Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/plugin/PluginUtil.cpp

Issue 11292028: Status bar menu added (Closed)
Patch Set: Addressing comments. Actual functionality fixes Created Aug. 1, 2013, 10:28 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/plugin/PluginClass.cpp ('K') | « src/plugin/PluginUtil.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginUtil.cpp
===================================================================
--- a/src/plugin/PluginUtil.cpp
+++ b/src/plugin/PluginUtil.cpp
@@ -44,3 +44,21 @@
return L"file:///" + url;
}
+CString ExtractDomain(const CString& url)
+{
+ int pos = 0;
+ if (url.Find('/', pos) >= 0)
+ url.Tokenize(L"/", pos);
+ CString domain = url.Tokenize(L"/", pos);
+ domain.MakeLower();
+ return domain;
+}
+
+void ReplaceString(std::wstring& input, const std::wstring placeholder, const std::wstring replacement)
+{
+ size_t replaceStart = input.find(placeholder);
+ if (replaceStart != std::string::npos)
+ {
+ input.replace(replaceStart, placeholder.length(), replacement);
+ }
+}
« src/plugin/PluginClass.cpp ('K') | « src/plugin/PluginUtil.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld