lsql-csv-0.1.0.6: A tool for CSV files data querying from the shell with short queries.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Lsql.Csv.Utils.BracketExpansion

Description

This module contains the curly bracket (braces) expansion implementation.

Synopsis

Documentation

bracketExpand :: String -> [String] Source #

The curly brackets (braces) expand function

The argument is a String, which you want to expand. Returns a list of expanded Strings.

There are given a few usage examples:

>>> bracketExpand "car{A,B}"
["carA","carB"]
>>> bracketExpand "car{1..5}"
["car1","car2","car3","car4","car5"]
>>> bracketExpand "{car,bus}{0..2}"
["car0","car1","car2","bus0","bus1","bus2"]