We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec4cd25 commit 176e6f8Copy full SHA for 176e6f8
1 file changed
google/cloud/storage/internal/bucket_metadata_cache.h
@@ -16,6 +16,7 @@
16
#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_INTERNAL_BUCKET_METADATA_CACHE_H
17
18
#include "google/cloud/storage/version.h"
19
+#include "absl/strings/match.h"
20
#include "absl/types/optional.h"
21
#include <cstddef>
22
#include <list>
@@ -51,7 +52,7 @@ class BucketMetadataCache {
51
52
53
static std::string NormalizeBucketName(std::string const& bucket) {
54
auto const prefix = std::string("projects/_/buckets/");
- if (bucket.rfind(prefix, 0) == 0) {
55
+ if (absl::StartsWith(bucket, prefix)) {
56
return bucket.substr(prefix.size());
57
}
58
return bucket;
0 commit comments