Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module contains the curly bracket (braces) expansion implementation.
Synopsis
- bracketExpand :: String -> [String]
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 String
s.
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"]