@abdellatif.dev/cryptjs
Version:
A JavaScript/TypeScript library that brings cryptographic functionality from Dart to the web
27 lines (26 loc) • 575 B
JavaScript
;
export default class StringBuffer {
/**
* @type {Array<string>}
*/
#buffer;
constructor() {
this.#buffer = [];
}
/**
* @description Appends a string to the buffer.
* @param {string} str The string to append to the buffer.
* @returns {void}
*/
append(str) {
this.#buffer.push(str);
}
/**
* @description Converts the buffer to a single string.
* @returns {string} The concatenated string from all appended parts.
*/
toString() {
return this.#buffer.join("");
}
}
//# sourceMappingURL=StringBuffer.js.map