UInt8(delim) converts with a check to make sure that delim fits in the
UInt8 type. (delim % UInt8) computes delim modulo 256 as a UInt8 – i.e. it
just drops the high bits.

On Thu, Dec 3, 2015 at 7:35 AM, James Gilbert <jgrgilb...@gmail.com> wrote:

> I don't understand this line in Tim's code:
>
>   data = readuntil(s, delim % UInt8)
>
> Is it the same as:
>
>   data = readuntil(s, UInt8(delim))
>
> ? I guess its purpose is to select this method:
>
>   readuntil(s::IOStream, delim::UInt8)
>
> which is faster than:
>
>   readuntil(s::IO, delim::Char)
>
>
>

Reply via email to