HORIZON HASKELLDocslts/ghc-10.0.x8c2f8e82026-10-19Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8c2f8e8 · 2026-10-19

Modulehakyll-4.17.0.0Haskell2010

Hakyll.Core.Util.String

Miscellaneous string manipulation functions.

  • 5 values
  • Packagehakyll-4.17.0.0
  • Exports5
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceString.hs
valuetrim :: String -> String
#

Trim a string (drop spaces, tabs and newlines at both sides).

valuesplitAll
  1. :: String

    Pattern

  2. -> String

    String to split

  3. -> [String]

    Result

#

A simple regex split function. The resulting list will contain no empty strings.

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"