jmillikin/haskell-re2 — pull request #1 by ryo1kato (2014-09-27 10:33:50+00:00)
Title: A new function to return match positions instead of ByteString

Added a new `matchPos` (and it's counterpart `c_matchpos`) for my own purpose, to return positions of match groups as `Int` instead of `ByteString`. I need this to split a huge bytestring into two part at a position of a regex match and submitting this request in a hope that it would also be useful to other people.

Code to return positions could be merged into `c_match` instead of creating a separate function, but my idea is, a user probably don't need match positions and strings at the same time. So, having separate function for this will save often costly `malloc` and `memcpy` calls when only positions are needed.