0
Files
src/components/database_utils/upper_bound_string.h
Avi Drissman 8ba1bad80d Update copyright headers in components/
The methodology used to generate this CL is documented in
https://crbug.com/1098010#c34.

No-Try: true
No-Presubmit: true
Bug: 1098010
Change-Id: If6a3370b0b2849d889ce797596fe1ccbad2f3fe6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3891619
Auto-Submit: Avi Drissman <avi@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1046502}
2022-09-13 19:22:36 +00:00

22 lines
751 B
C++

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_DATABASE_UTILS_UPPER_BOUND_STRING_H_
#define COMPONENTS_DATABASE_UTILS_UPPER_BOUND_STRING_H_
#include <string>
namespace database_utils {
// Returns a string with the following property:
// Condition (str >= prefix AND str < UpperBoundString(prefix))
// is satisfied for all strs that start with prefix and only for them.
// This can be used for optimization purposes to avoid using the LIKE operator.
// prefix must be a UTF-8 string.
std::string UpperBoundString(const std::string& prefix);
} // namespace database_utils
#endif // COMPONENTS_DATABASE_UTILS_UPPER_BOUND_STRING_H_