MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / ab2str

Method ab2str

static/widgets/load-save.ts:201–206  ·  view source on GitHub ↗
(buf: ArrayBuffer)

Source from the content-addressed store, hash-verified

199
200 // From https://developers.google.com/web/updates/2014/08/Easier-ArrayBuffer-String-conversion-with-the-Encoding-API
201 private static ab2str(buf: ArrayBuffer) {
202 const dataView = new DataView(buf);
203 // The TextDecoder interface is documented at http://encoding.spec.whatwg.org/#interface-textdecoder
204 const decoder = new TextDecoder('utf-8');
205 return decoder.decode(dataView);
206 }
207
208 private onLocalFile(event: JQuery.ChangeEvent) {
209 const files = event.target.files;

Callers 1

onLocalFileMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected