aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/core/src/firebase/firestore/util
diff options
context:
space:
mode:
authorGravatar Gil <mcg@google.com>2018-03-21 18:43:29 -0700
committerGravatar GitHub <noreply@github.com>2018-03-21 18:43:29 -0700
commitcf630bfee60694f9bf1577972df169badda0b6e0 (patch)
tree2b815ec0e241666aa04da5e58e7c85ce23518e50 /Firestore/core/src/firebase/firestore/util
parent5f49b2f3f9866e4db13d09857eb3b548239cc62e (diff)
Port FSTLevelDBKey to C++ (#937)
Diffstat (limited to 'Firestore/core/src/firebase/firestore/util')
-rw-r--r--Firestore/core/src/firebase/firestore/util/string_util.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/Firestore/core/src/firebase/firestore/util/string_util.h b/Firestore/core/src/firebase/firestore/util/string_util.h
index 3de177d..96ba0b0 100644
--- a/Firestore/core/src/firebase/firestore/util/string_util.h
+++ b/Firestore/core/src/firebase/firestore/util/string_util.h
@@ -32,7 +32,7 @@ namespace firebase {
namespace firestore {
namespace util {
-/*
+/**
* Returns the smallest lexicographically larger string of equal or smaller
* length. Returns an empty string if there is no such successor (if the input
* is empty or consists entirely of 0xff bytes).
@@ -44,7 +44,7 @@ namespace util {
*/
std::string PrefixSuccessor(absl::string_view prefix);
-/*
+/**
* Returns the immediate lexicographically-following string. This is useful to
* turn an inclusive range into something that can be used with Bigtable's
* SetLimitRow():
@@ -65,6 +65,11 @@ std::string PrefixSuccessor(absl::string_view prefix);
*/
std::string ImmediateSuccessor(absl::string_view s);
+/**
+ * Returns true if the given value starts with the given prefix.
+ */
+bool StartsWith(const std::string &value, const std::string &prefix);
+
} // namespace util
} // namespace firestore
} // namespace firebase