Safe HaskellSafe

Eta.Types.String

Description

  • String operations

Synopsis

Documentation

type String = [Char] #

Breaks a String into a [String] at newline Chars

>>> lines "Hello\nI'm Joe"
["Hello","I'm Joe"]

Joins a [String] appending a newline to each element

>>> unlines ["Hello", "I'm Joe"]
"Hello\nI'm Joe\n"

Splits a String into a [String] at Chars representing white spaces.

>>> words "How are you"
["How","are","you"]

Joins a [String] appending a space to each element

>>> unwords ["How", "are", "you"]
"How are you"