Ticket #1 (new enhancement)

Opened 5 years ago

Need some kind of cursor API or access to internals.

Reported by: edwardk Owned by: somebody
Priority: minor Milestone:
Component: component1 Version:
Keywords: Cc:

Description

One thing that it is not possible to do under the current Text API that you can do with ByteStrings? is slice to and from known positions in constant time.

One way to expose this functionality would be to mimic the Bytestring style of offering an unsafe Data.Text.Internals, which exposes the underlying array-based representation.

A slightly more palatable way would be to expose some kind of external iteration and cursor interface, where you can ask for a cursor into a Text fragment, advance/uncons (or even retreat) a cursor by one character, and ask for the slice of a Text fragment between two cursors.

Note: See TracTickets for help on using tickets.