async readString(delim) {
    if (delim.length !== 1) {
      throw new Error("Delimiter should be a single character");
    }
    const buffer = await this.readSlice(delim.charCodeAt(0));
    if (buffer === null) return null;
    return new TextDecoder().decode(buffer);
  }
/** readString() reads until the first occurrence of delim in the input,
   * returning a string containing the data up to and including the delimiter.
   * If ReadString encounters an error before finding a delimiter,
   * it returns the data read before the error and the error itself
   * (often `null`).
   * ReadString returns err != nil if and only if the returned data does not end
   * in delim.
   * For simple uses, a Scanner may be more convenient.
   */
readString() reads until the first occurrence of delim in the input,
returning a string containing the data up to and including the delimiter.
If ReadString encounters an error before finding a delimiter,
it returns the data read before the error and the error itself
(often `null`).
ReadString returns err != nil if and only if the returned data does not end
in delim.
For simple uses, a Scanner may be more convenient.
readString () reads until the first occurrence of delim in the input returning a string containing the data up to and including the delimiter . If ReadString encounters an error before finding a delimiter it returns the data read before the error and the error itself ( often ` null ` ) . ReadString returns err ! = nil if and only if the returned data does not end in delim . For simple uses a Scanner may be more convenient .
async readString(delim) {
    if (delim.length !== 1) {
      throw new Error("Delimiter should be a single character");
    }
    const buffer = await this.readSlice(delim.charCodeAt(0));
    if (buffer === null) return null;
    return new TextDecoder().decode(buffer);
  }
async readString ( delim ) { if ( delim . length !== 1 ) { throw new Error ( "Delimiter should be a single character" ) ; } const buffer = await this . readSlice ( delim . charCodeAt ( 0 ) ) ; if ( buffer === null ) return null ; return new TextDecoder ( ) . decode ( buffer ) ; }
readString() reads until the first occurrence of delim in the input,
 returning a string containing the data up to and including the delimiter.
readString () reads until the first occurrence of delim in the input returning a string containing the data up to and including the delimiter .