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

Unified Diff: src/Utils.h

Issue 29402569: Issue 5074 - fix tests for "is allowed connection" (Closed)
Patch Set: Created April 4, 2017, 10:51 a.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
« no previous file with comments | « no previous file | test/FilterEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/Utils.h
diff --git a/src/Utils.h b/src/Utils.h
index 287b2800763aa817ef166e6ae95374c5e1352916..1c4ee830a212d6a63a3b0a2b1fb525424a1784e3 100644
--- a/src/Utils.h
+++ b/src/Utils.h
@@ -48,6 +48,10 @@ namespace AdblockPlus
std::string ToUtf8String(const std::wstring& str);
std::wstring CanonizeUrl(const std::wstring& url);
#endif
+ inline bool BeginsWith(const std::string& str, const std::string& beginning)
+ {
+ return 0 == str.compare(0, beginning.size(), beginning);
+ }
}
}
« no previous file with comments | « no previous file | test/FilterEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld