Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/intl/icu_capi/bindings/js/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  ICU4XList.mjs   Sprache: unbekannt

 
Spracherkennung für: .mjs vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

import wasm from "./diplomat-wasm.mjs"
import * as diplomatRuntime from "./diplomat-runtime.mjs"

const ICU4XList_box_destroy_registry = new FinalizationRegistry(underlying => {
  wasm.ICU4XList_destroy(underlying);
});

export class ICU4XList {
  #lifetimeEdges = [];
  constructor(underlying, owned, edges) {
    this.underlying = underlying;
    this.#lifetimeEdges.push(...edges);
    if (owned) {
      ICU4XList_box_destroy_registry.register(this, underlying);
    }
  }

  static create() {
    return new ICU4XList(wasm.ICU4XList_create(), true, []);
  }

  static create_with_capacity(arg_capacity) {
    return new ICU4XList(wasm.ICU4XList_create_with_capacity(arg_capacity), true, []);
  }

  push(arg_val) {
    const buf_arg_val = diplomatRuntime.DiplomatBuf.str8(wasm, arg_val);
    wasm.ICU4XList_push(this.underlying, buf_arg_val.ptr, buf_arg_val.size);
    buf_arg_val.free();
  }

  len() {
    return wasm.ICU4XList_len(this.underlying);
  }

  is_empty() {
    return wasm.ICU4XList_is_empty(this.underlying);
  }
}

[ Dauer der Verarbeitung: 0.29 Sekunden  ]