Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/std/io/bufio.ts>BufReader#readString

A modern runtime for JavaScript and TypeScript.
Go to Latest
method BufReader.prototype.readString
import { BufReader } from "https://deno.land/x/deno@v0.35.0/std/io/bufio.ts";

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 io.EOF). 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.

Parameters

delim: string

Returns

Promise<string | Deno.EOF>