MCPcopy Create free account
hub / github.com/apache/arrow / Replace

Function Replace

cpp/src/arrow/util/string.cc:197–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197std::optional<std::string> Replace(std::string_view s, std::string_view token,
198 std::string_view replacement) {
199 size_t token_start = s.find(token);
200 if (token_start == std::string::npos) {
201 return std::nullopt;
202 }
203 return std::string(s.substr(0, token_start)) + std::string(replacement) +
204 std::string(s.substr(token_start + token.size()));
205}
206
207Result<bool> ParseBoolean(std::string_view value) {
208 if (AsciiEqualsCaseInsensitive(value, "true") || value == "1") {

Callers 5

GetNextFilenameMethod · 0.85
TESTFunction · 0.85
TEST_FFunction · 0.85
ExecMethod · 0.85
ReplaceStringImplMethod · 0.85

Calls 3

substrMethod · 0.80
findMethod · 0.45
sizeMethod · 0.45

Tested by 2

TESTFunction · 0.68
TEST_FFunction · 0.68