MCPcopy Create free account
hub / github.com/apache/cloudberry / FindAndReplace

Function FindAndReplace

gpcontrib/gpcloud/src/s3utils.cpp:340–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338}
339
340void FindAndReplace(string &str, const string &find, const string &replace) {
341 if (find.empty()) return;
342
343 size_t pos = 0;
344
345 while ((pos = str.find(find, pos)) != string::npos) {
346 str.replace(pos, find.length(), replace);
347 pos += replace.length();
348 }
349}
350
351// Note: better to sort queries automatically
352// for more information refer to Amazon S3 document:

Callers 6

TESTFunction · 0.85
constructReaderParamsMethod · 0.85
listBucketMethod · 0.85
SignRequestV4Function · 0.85
S3UrlMethod · 0.85
extractEncodedPrefixMethod · 0.85

Calls 2

findMethod · 0.80
lengthMethod · 0.80

Tested by 1

TESTFunction · 0.68