texts-0.2.1: Common things for text

Safe HaskellNone

Data.Texts

Synopsis

Documentation

type LText = TextSource

Lazy text.

type SText = TextSource

Strict text.

class ToText a whereSource

A class for converting to Text.

class FromText a whereSource

A class for converting from Text.

Instances

explodeLinks :: SText -> [Either URI SText]Source

Explode a text into its constituent links.

bigUp :: Integral a => a -> STextSource

Big 'em up.

relativeTimesSource

Arguments

:: UTCTime

The later time span.

-> UTCTime

The earlier time span.

-> Bool

Display 'in/ago'?

-> SText

Example: '3 seconds ago', 'in three days'.

Display a time span as one time relative to another.

ellipsize :: Int -> SText -> STextSource

Limit the length of the string and ellipsize it.

ordSuffix :: Integral n => n -> STextSource

Add a suffix to an integral.