Re: [xml-dev] genx - string termination and bounding

From
Tim Bray <>
To
John Cowan <>
Date
2004-01-22T04:09:04Z
ID
<>
Thread
Re: [xml-dev] genx - string termination and bounding
On Jan 21, 2004, at 7:56 PM, John Cowan wrote:

>>  genxText(genxWriter w, utf8Byte * start, utf8Byte * end)
>
> I think the second argument should be one past the end.  This makes
> outputting things in chunks very easy: you just set start to end and
> call it again with a new value of end.  Computing the length from
> the end or vice versa is also not subject to fencepost errors.

Huh?  Oh, I get it, I think we're saying the same thing.  Suppose I 
have the characters "John Cowan said" in the variable named "buf", so 
then if I wanted to just emit "John" I'd do

  genxText(w, buf, buf + 4)

Right? -Tim