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

Method FromString

cpp/src/arrow/buffer.cc:151–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151std::shared_ptr<Buffer> Buffer::FromString(std::string data) {
152 if (data.empty()) {
153 return std::shared_ptr<Buffer>{new Buffer()};
154 }
155
156 auto size_in_bytes = static_cast<int64_t>(data.size());
157 return TakeOwnership(std::move(data), size_in_bytes);
158}
159
160std::shared_ptr<Buffer> SliceMutableBuffer(std::shared_ptr<Buffer> buffer,
161 const int64_t offset, const int64_t length) {

Callers

nothing calls this directly

Calls 3

TakeOwnershipFunction · 0.85
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected