curly-expander-0.2.0.2: Curly braces (brackets) expanding
LicenseLGPL-3
Maintainerp-w@stty.cz
Stabilitytesting
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.CurlyExpander

Description

This is the main module of the curly-expander package.

Synopsis

Documentation

curlyExpand :: Text -> [Text] Source #

Curly braces (brackets) expand function

First argument is a Text, which you want to expand. Second argument is a list of expanded Texts.

There are given few usage examples:

>>> curlyExpand "car{A,B}"
["carA","carB"]
>>> curlyExpand "car{1..5}"
["car1","car2","car3","car4","car5"]
>>> curlyExpand "car{{A,B},{C,D}}"
["carA", "carB", "carC", "carD"]
>>> curlyExpand "{car,bus}{A..C}"
["carA", "carB", "carC", "busA", "busB", "busC"]

Be aware, that these examples will run only with OverloadedStrings language extension and proper Text imports.