MCPcopy
hub / github.com/jtesta/ssh-audit / write_string

Method write_string

src/ssh_audit/writebuf.py:50–54  ·  view source on GitHub ↗
(self, v: Union[bytes, str])

Source from the content-addressed store, hash-verified

48 return self.write(struct.pack('>I', v))
49
50 def write_string(self, v: Union[bytes, str]) -> 'WriteBuf':
51 if not isinstance(v, bytes):
52 v = bytes(bytearray(v, 'utf-8'))
53 self.write_int(len(v))
54 return self.write(v)
55
56 def write_list(self, v: List[str]) -> 'WriteBuf':
57 return self.write_string(','.join(v))

Callers 7

write_listMethod · 0.95
write_mpint2Method · 0.95
test_stringMethod · 0.80
send_initMethod · 0.80
send_initMethod · 0.80
send_initMethod · 0.80
send_initMethod · 0.80

Calls 2

write_intMethod · 0.95
writeMethod · 0.95

Tested by 1

test_stringMethod · 0.64