MCPcopy Create free account
hub / github.com/denoland/std / #setString

Method #setString

http/unstable_formdata_encoder_stream.ts:204–207  ·  view source on GitHub ↗
(buffer: Uint8Array, x: string)

Source from the content-addressed store, hash-verified

202 }
203
204 #setString(buffer: Uint8Array, x: string): Uint8Array {
205 if (buffer.length < x.length * 3) buffer = new Uint8Array(x.length * 3);
206 return buffer.subarray(0, this.#encoder.encodeInto(x, buffer).written);
207 }
208
209 /**
210 * Convert the {@linkcode FormDataEncoderStream} to a {@linkcode Response} to send to a

Callers 1

#handleMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected