Popularity
1.6
Stable
Activity
0.0
Stable
0
3
0
Monthly Downloads: 0
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags:
Text
fillit alternatives and similar packages
Based on the "Text" category.
Alternatively, view fillit alternatives based on common mentions on social networks and blogs.
-
skylighting
A Haskell syntax highlighting library with tokenizers derived from KDE syntax highlighting descriptions -
double-conversion
A fast Haskell library for converting between double precision floating point numbers and text strings. It is implemented as a binding to the V8-derived C++ double-conversion library.
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
Promo
coderabbit.ai
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of fillit or a related project?
README
fillit
Flexible String Substitution library
Features
- Support two kinds of substitutions: required and optional.
- You can change the symbols for substitutions.
Note: This library does not support any sanitization.
Usage
Example:
ghci> :set -XOverloadedStrings
ghci> import Data.Text.Fillit
ghci> import qualified Data.HashMap.Lazy as HM
ghci> let dic = HM.fromList [("name", "Tom"), ("age", "22")]
ghci> fill "$name$ (%age%)" dic
Right "Tom (22)"
ghci> fill "$name$ (%school%)" dic
Right "Tom (%school%)"
ghci> fill "$name$ ($school$)" dic
Left "There is no key in dict, such as school"
By default, the symbol $
means a required substitution.
On the other hand, the symbol %
means a optional substitution.
These symbols can be changed. See fill'
.
Development
$ git clone [email protected]:ishiy1993/fillit.git
$ cd fillit
$ stack build
$ stack test