Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement readString #607

Merged
merged 4 commits into from
Sep 22, 2019
Merged

Implement readString #607

merged 4 commits into from
Sep 22, 2019

Conversation

dsseng
Copy link
Contributor

@dsseng dsseng commented Sep 21, 2019

Closes #606

io/bufio.ts Outdated Show resolved Hide resolved
io/bufio.ts Show resolved Hide resolved
@kevinkassimo
Copy link
Contributor

kevinkassimo commented Sep 21, 2019

Hmm I am also thinking if we should also provide a version that possibly allow multi-char delimiter?

@zekth
Copy link
Contributor

zekth commented Sep 21, 2019

Hmm I am also thinking if we should also provide a version that possibly allow multi-char delimiter?

IMO we need multichar delimiter

@kevinkassimo
Copy link
Contributor

Hmm I am also thinking if we should also provide a version that possibly allow multi-char delimiter?

IMO we need multichar delimiter

On second thought I noticed that since BufReader is implemented in a way strictly compliant with Go’s bufio counterparts, maybe single char restriction is fine here. I do hope though if we can provide another utility for unlimited buffered reader that automatically resize/reallocate the internal buffer which would allow implementation of multi-char delim easier (maybe an extension of deno.Buffer. We have something similar for xeval that recently got moved here)

io/bufio.ts Show resolved Hide resolved
Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ry ry merged commit 20b6408 into denoland:master Sep 22, 2019
@dsseng dsseng deleted the feat/read-string branch September 22, 2019 17:07
ry pushed a commit to ry/deno that referenced this pull request Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement BufReader.readString(delim)
5 participants