string-0.1.0: Common things for strings

Safe HaskellSafe-Inferred

Data.Strings

Description

Extra functions and classes for dealing with Strings.

Synopsis

Documentation

module Data.Char

lower :: String -> StringSource

Lower case a string.

upper :: String -> StringSource

Upper case a string.

trim :: String -> StringSource

Trim a string.

ellipsize :: Int -> String -> StringSource

Limit the length of the string and ellipsize it.

ordSuffix :: Integral n => n -> StringSource

Add a suffix to an integral.

padSource

Arguments

:: Int

Times.

-> String

Pad.

-> String

String.

-> String

Padded string.

Pad the string with the given string.

stringToMaybe :: String -> Maybe StringSource

If a trimmed string is empty, return nothing.

class ToString a whereSource

A class for converting to strings.

Methods

toString :: a -> StringSource

Instances