yi- The Haskell-Scriptable Editor

Safe HaskellSafe-Infered



String manipulation utilities



chomp :: String -> String -> StringSource

Remove any trailing strings matching irs (input record separator) from input string. Like perl's chomp(1).

dropSpace :: String -> StringSource

Trim spaces at beginning and end

mapLines :: (String -> String) -> String -> StringSource

A helper function for creating functions suitable for modifySelectionB and modifyRegionB. To be used when the desired function should map across the lines of a region.

lines' :: String -> [String]Source

Split a String in lines. Unlike lines, this does not remove any empty line at the end.

unlines' :: [String] -> StringSource

Inverse of lines'. In contrast to unlines, this does not add an empty line at the end.