| License | LGPL-3 |
|---|---|
| Maintainer | p-w@stty.cz |
| Stability | testing |
| Portability | POSIX |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Text.CurlyExpander
Description
This is the main module of the curly-expander package.
Synopsis
- curlyExpand :: Text -> [Text]
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.