scroll/src/common/editor/buffer.ts

25 lines
261 B
JavaScript

class Buffer {
#b = '';
constructor() {
}
append(s: string): void {
this.#b += s;
}
appendLine(s: string): void {
this.#b += s + '\r\n';
}
clear(): void {
this.#b = '';
}
getBuffer(): string {
return this.#b;
}
}
export default Buffer;