Re: bio.readto and EOF
[Thread Prev] | [Thread Next]
[Date Prev] | [Date Next]
- Subject: Re: bio.readto and EOF
- From: Ori Bernstein <ori@xxxxxxxxxxxxxx>
- Reply-to: myrddin-dev@xxxxxxxxxxxxxx
- Date: Thu, 21 Mar 2019 20:21:06 -0700
- To: myrddin-dev@xxxxxxxxxxxxxx
- Cc: Carlin Bingham <cb@xxxxxxxxxxxx>
On Fri, 15 Mar 2019 15:51:21 -0700, Ori Bernstein <ori@xxxxxxxxxxxxxx> wrote:
> On Sat, 16 Mar 2019 10:58:26 +1300
> Carlin Bingham <cb@xxxxxxxxxxxx> wrote:
>
> > Hi,
> >
> > When using bio.readto I often want to be able to tell if the delimeter
> > was found, or if the file was truncated, but there doesn't appear to
> > be a way to tell if readto stopped searching because it found what it
> > was looking for or if it reached EOF, other than to do another read.
>
> I don't remember wanting it very often -- but I can see the purpose.
>
> > A simple solution to this would be a new function that reads to and
> > includes the delimeter in the returned slice if it was found, which can
> > be used intead when you care. I've tentatively included a patch for this.
> >
> > Is this something that would be wanted? Is there a better solution? Or a
> > better name?
>
> readdelim or readterm?
>
Committed under the name readterm
--
Ori Bernstein
| bio.readto and EOF | Carlin Bingham <cb@xxxxxxxxxxxx> |
| Re: bio.readto and EOF | Ori Bernstein <ori@xxxxxxxxxxxxxx> |
- Prev by Date: Re: [PATCH] Add synchronization to xset.
- Previous by thread: Re: bio.readto and EOF
- Next by thread: [PATCH] Add synchronization to xset.
- Index(es):