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

Unified Diff: compiled/String.h

Issue 29712634: Noissue - add SplitString and TrimSpaces helpers (Closed) Base URL: github.com:adblockplus/adblockpluscore
Patch Set: Created March 1, 2018, 2:57 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
« no previous file with comments | « no previous file | compiled/String.cpp » ('j') | compiled/String.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/String.h
diff --git a/compiled/String.h b/compiled/String.h
index 14e2fda23b75b71fe2bfbd3b6c1aa9631b68af92..3ea7a6782322147a84e5f0da8752910017285167 100644
--- a/compiled/String.h
+++ b/compiled/String.h
@@ -25,6 +25,7 @@
#include <iostream>
#include <codecvt>
#endif
+#include <utility>
#include "base.h"
#include "debug.h"
@@ -455,4 +456,11 @@ inline std::ostream& operator<<(std::ostream& os, const OwnedString& str)
return os << static_cast<const String&>(str);
}
#endif
+
+DependentString TrimSpaces(const String& value);
+
+// Splits the `value` string into two `DependentString`s excluding the character staying at `separatorPos`.
+// Useful for parsing.
+std::pair<DependentString, DependentString> SplitString(const String& value, String::size_type separatorPos);
+
ABP_NS_END
« no previous file with comments | « no previous file | compiled/String.cpp » ('j') | compiled/String.cpp » ('J')

Powered by Google App Engine
This is Rietveld