HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulehakyll-4.17.0.0Haskell2010

Hakyll.Core.Util.String

Miscellaneous string manipulation functions.

Synopsis
  • Packagehakyll-4.17.0.0
  • Exports5
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceString.hs

Find the first instance of needle (must be non-empty) in haystack. We return the prefix of haystack before needle is matched.

Examples:

needlePrefix "cd" "abcde" = "ab"
needlePrefix "ab" "abc" = ""
needlePrefix "ab" "xxab" = "xx"
needlePrefix "a" "xx" = "xx"