Autor: ph10 Fecha: A: Ralf Junker Cc: pcre-dev Asunto: Re: [pcre-dev] New API
On Wed, 15 Jan 2014, Ralf Junker wrote:
> Changes look good to me, just one though on this quote from above:
>
> "Question: There have been requests for the pattern to be given as a
> pointer and length, rather than a zero-terminated string. If that is
> ever to be implemented, now is the time. A negative length could mean
> zero-terminated. What do people think?"
>
> Yes, I would appreciate to be able to specify the length!
There are now two votes for this, so I will definitely consider it.
> "If the nByte argument is less than zero, then zSql is read up to the
> first zero terminator. If nByte is non-negative, then it is the
> maximum number of bytes read from zSql. When nByte is non-negative,
> the zSql string ends at either the first '\000' or '\u0000' character
> or the nByte-th byte, whichever comes first.
That I do not like. I think if a positive length is given, it should be
the length used. Then zero values can be included, and I know some people
do want that. It also makes patterns and subjects consistent.