Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
String functions.
Synopsis
- str_eq_ci :: String -> String -> Bool
- filter_cr :: String -> String
- delete_trailing_whitespace :: String -> String
- unwords_nil :: [String] -> String
- unlines_nil :: [String] -> String
- unlinesNoTrailingNewline :: [String] -> String
- capitalise :: String -> String
- unCapitalise :: String -> String
- on_lines :: (String -> String) -> String -> String
Documentation
str_eq_ci :: String -> String -> Bool Source #
Case-insensitive ==
.
map (str_eq_ci "ci") (words "CI ci Ci cI")
unwords_nil :: [String] -> String Source #
Variant of unwords
that does not write spaces for NIL elements.
unwords_nil [] == "" unwords_nil ["a"] == "a" unwords_nil ["a",""] == "a" unwords_nil ["a","b"] == "a b" unwords_nil ["a","","b"] == "a b" unwords_nil ["a","","","b"] == "a b" unwords_nil ["a","b",""] == "a b" unwords_nil ["a","b","",""] == "a b" unwords_nil ["","a","b"] == "a b" unwords_nil ["","","a","b"] == "a b"
unlines_nil :: [String] -> String Source #
Variant of unlines
that does not write empty lines for NIL elements.
unlinesNoTrailingNewline :: [String] -> String Source #
unlines without a trailing newline.
unlines (words "a b c") == "a\nb\nc\n" unlinesNoTrailingNewline (words "a b c") == "a\nb\nc"
capitalise :: String -> String Source #
Capitalise first character of word.
capitalise "freqShift" == "FreqShift"
unCapitalise :: String -> String Source #
Downcase first character of word.
unCapitalise "FreqShift" == "freqShift"