suggestion for the BinaryTagInit function, start-tag parameter

Started by kdmoyers, February 01, 2018, 05:04:42 AM

Previous topic - Next topic

kdmoyers

I have an enhancement suggestion for the BinaryTagInit function, start-tag parameter:

Presently, start-tag is not permitted to be an empty string.

I suggest that empty string be permitted, and be interpreted to mean "match immediately, zero length start-tag". 

So, on the first Find operation, it matches the first character in the buffer.  On subsequent Finds, it matches the character following the last end-tag.

This would allow the BinaryTag method to work on buffers that are simple delimited strings, like LF terminated text files, without any fussing about with inserting start-tags.

Yes, there are other ways to do this of course, but the BinaryTag family of functions is so tidy and fast, it would be nice to use it here also.

I would rank this suggestion as "only if bored."  (smile)

-Kirby
The mind is everything; What you think, you become.

JTaylor


td

Thanks for the suggestion.  It gets around the problem of having to modify the binary buffer to simulate reading linefeed delimited records.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

JTaylor