Community
Modules 50

Data.Text.Internal.Lazy.Search

experimental

Warning: this is an internal module, and does not have a stable API or name. Functions in this module may not check or enforce preconditions expected by public modules. Use at your own risk!

Fast substring search for lazy Text, based on work by Boyer, Moore, Horspool, Sunday, and Lundh. Adapted from the strict implementation.

1 generation diagnostics
  • unattached documentation comment at 92:5

indices :: Text -> Text -> [Int64]

O(n+m) Find the offsets of all non-overlapping indices of needle within haystack.

This function is strict in needle, and lazy (as far as possible) in the chunks of haystack.

In (unlikely) bad cases, this algorithm's complexity degrades towards O(n*m).

Text

Substring to search for (needle)

Text

Text to search in (haystack)

Maintainer
bos@serpentine.com
Portability
GHC
Copyright
(c) 2009, 2010 Bryan O'Sullivan
License
BSD-style
Build record and source files

Community contribution. The service has not verified this documentation. The generator reported 2 diagnostics.

Target: Linux on x86-64. Some inferred types and resolved links are not available.

Generator: aihc-haddock-858b1951-web-1

Metadata snapshot: 0b0724abd14577f7a6c8172d62e3e1c0808feb114d4d379402e17f37e3c7801e

Open the dependency plan · Download the documentation model

Import a package

Enter a package name and an exact version from Hackage. The site contains imported versions only.