text-format-simple-1.1.0: Simple text formatting library.

Safe HaskellSafe-Infered

Text.Format

Synopsis

Documentation

format :: String -> [String] -> StringSource

Formats input string, using C#-style.

First param is the input string in the form: "Please, replace here {0} and here {1}".

Second param is list of strings to put into {0}, {1} .. {N} positions.

Example:

 format "Some {0} think that 1 + 1 = {1}." ["people",show 10]

Result is:

 "Some people think that 1 + 1 = 10."