MCPcopy Create free account
hub / github.com/denodrivers/postgres / readCString

Method readCString

connection/packet.ts:75–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73 }
74
75 readCString(): string {
76 const start = this.#offset;
77 // find next null byte
78 const end = this.#buffer.indexOf(0, start);
79 const slice = this.#buffer.slice(start, end);
80 // add +1 for null byte
81 this.#offset = end + 1;
82 return this.#decoder.decode(slice);
83 }
84}
85
86export class PacketWriter {

Callers 2

parseNoticeMessageFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected