MCPcopy Create free account
hub / github.com/f0rr0/oliphaunt / add_cstring

Method add_cstring

src/protocol/buffer_writer.rs:58–64  ·  view source on GitHub ↗
(&mut self, value: &str)

Source from the content-addressed store, hash-verified

56 }
57
58 pub fn add_cstring(&mut self, value: &str) -> &mut Self {
59 if !value.is_empty() {
60 self.add_string(value);
61 }
62 self.add_bytes(&[0]);
63 self
64 }
65
66 pub fn add_string(&mut self, value: &str) -> &mut Self {
67 let length = byte_length_utf8(value);

Callers

nothing calls this directly

Calls 2

add_stringMethod · 0.45
add_bytesMethod · 0.45

Tested by

no test coverage detected