yi-0.7.2: The Haskell-Scriptable Editor

Safe HaskellSafe-Inferred

Yi.String

Description

String manipulation utilities

Synopsis

Documentation

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.