On Saturday 07 May 2005 12:06, Leopold Toetsch wrote:
> Patrick R. Michaud wrote:
> > I'd like to make a slight change to the is_digit, is_wordchar,
> > and other is_* ops.  Currently calling these ops at the offset
> > following the last codepoint results in a
> > "get_byte past the end of the buffer (1 of 1)" error,
> > it would be nicer if they simply returned false (0) at
> > this one position.  (Going any further than that could generate
> > the error message.)
>
> Sounds reasonable. We can change that along with the proposed
> C<is_cclass> implementation.
Okay, I'll implement it.

> > As it is now, I'm having to put in extra checks to watch for
> > the end of the string when I'm just wanting to run along a
> > string of digits.  Of course, if we had an op to find the
> > offset of the first non-digit/non-word/non-whitespace/etc.
> > codepoint then I could use that.  :-)
>
> Well, then working on the general find and find_not classifying opcodes
> and implementation seems to be more effective, then ...
>
> > I'll be glad to write the patch for is_digit and friends
> > if it's appropriate.
>
> ... reparing doomed code :-)
>
> > Pm
>
> leo
jens

Reply via email to