1-- | Miscellaneous string manipulation functions.
3module Hakyll.Web.Util.String
8import Data.Char (isSpace)
10import System.FilePath (splitPath, takeDirectory, joinPath)
12-- | Trim a string (drop spaces, tabs and newlines at both sides).
14trim :: String -> String
15trim = reverse . trim' . reverse . trim'
17 trim' = dropWhile isSpace
19-- | Get the relative url to the site root, for a given (absolute) url
21toSiteRoot :: FilePath -> FilePath
22toSiteRoot = emptyException . joinPath . map parent . splitPath . takeDirectory
25 emptyException [] = "."
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list