Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Magidovich <mgsergio@mapswithme.com>2016-05-24 11:14:55 +0300
committerSergey Magidovich <mgsergio@mapswithme.com>2016-05-25 13:49:21 +0300
commit10782c6d3ed310aa316e96a2aa6be487a4fbfde6 (patch)
tree79e217d327411b7dd1599ebfa42f70aa1e5b554d /indexer/postcodes_matcher.hpp
parent3a82ce50c4c009f7dede62defca828a042f925ba (diff)
Move postcodes_matcher to indexer.
Diffstat (limited to 'indexer/postcodes_matcher.hpp')
-rw-r--r--indexer/postcodes_matcher.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/indexer/postcodes_matcher.hpp b/indexer/postcodes_matcher.hpp
new file mode 100644
index 0000000000..96557a239c
--- /dev/null
+++ b/indexer/postcodes_matcher.hpp
@@ -0,0 +1,17 @@
+#pragma once
+
+#include "indexer/string_slice.hpp"
+
+#include "std/cstdint.hpp"
+#include "std/string.hpp"
+
+namespace search
+{
+bool LooksLikePostcode(StringSliceBase const & slice, bool handleAsPrefix);
+/// Splits s into tokens and call LooksLikePostcode(TokenSlice) on the result.
+/// If checkPrefix is true returns true if some postcode starts with s.
+/// If checkPrefix is false returns true if s equals to some postcode.
+bool LooksLikePostcode(string const & s, bool handleAsPrefix);
+
+size_t GetMaxNumTokensInPostcode();
+} // namespace search