code: function writeStringToMemory(string, buffer, dontAddNull) {
    Runtime.warnOnce('writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!');
  
    var /** @type {number} */ lastChar, /** @type {number} */ end;
    if (dontAddNull) {
      // stringToUTF8Array always appends null. If we don't want to do that, remember the
      // character that existed at the location where the null will be placed, and restore
      // that after the write (below).
      end = buffer + lengthBytesUTF8(string);
      lastChar = HEAP8[end];
    }
    stringToUTF8(string, buffer, Infinity);
    if (dontAddNull) HEAP8[end] = lastChar; // Restore the value under the null character.
  }
docs: Deprecated: This function should not be called because it is unsafe and does not provide a maximum length limit of how many bytes it is allowed to write. Prefer calling the function stringToUTF8Array() instead, which takes in a maximum length that can be used to be secure from out of bounds writes. @deprecated