MCPcopy Create free account
hub / github.com/MhmRdd/NoHello / string>

Method string>

module/src/main/cpp/utils.cpp:325–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323
324template<>
325bool xwrite<std::string>(int fd, const std::string& data) {
326 uint64_t size = data.size();
327 if (write(fd, &size, sizeof(size)) != sizeof(size)) {
328 return false;
329 }
330 if (write(fd, data.data(), size) != static_cast<ssize_t>(size)) {
331 return false;
332 }
333 return true;
334}
335
336bool xwrite(int fd, const char* data) {
337 if (!data) return false;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected