texts-0.3.1: User-facing operations for dealing with texts

Safe HaskellNone

Texts.English

Contents

Description

English-focused text operations.

Synopsis

Marketing

bigUp :: Integral a => a -> STextSource

Given an integral number, give it a vague English description which makes it seem better than it is. Examples: <3 -> a couple, <1000 -> hundreds, etc.

Time

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.

Typography

ellipsize :: Int -> SText -> STextSource

Limit the length of the string and ellipsize it.

English numbers

ordSuffix :: Integral n => n -> STextSource

Add a suffix to an integral, e.g. 1st, 2nd, 3rd, 21st.

English grammar

indefinite :: SText -> STextSource

The indefinite article to be used before a word, e.g. "An" elephant, "a" car, etc.

Letter information

isVowel :: Char -> BoolSource

Is a character a vowel?

isConsonant :: Char -> BoolSource

Is a character a consonant?