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 2fcc7d8 commit e9dbaa3Copy full SHA for e9dbaa3
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>
@@ -52,7 +53,7 @@ class BucketMetadataCache {
52
53
54
static std::string NormalizeBucketName(std::string const& bucket) {
55
auto const prefix = std::string("projects/_/buckets/");
- if (bucket.rfind(prefix, 0) == 0) {
56
+ if (absl::StartsWith(bucket, prefix)) {
57
return bucket.substr(prefix.size());
58
}
59
return bucket;
0 commit comments