KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
format
★ 17
Open GitHub ↗
A simple string formatter for Elixir
Download README (.md)
Explore Similar Repositories
darling-security
:
Apple's Security framework
pave
:
Paving the way to better state management.
atom-genesis-syntax
:
Custom syntax theme for Atom text editor (retired)
Visma.Net
:
This is an open source API client for Visma.net Integrations
app-transport-security-talk-jan-2016
:
“App Transport Security: What, Why, How?”
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
format
?
Download (.md)
# Format --- **WARNING**: This library is of alpha quality. There's a lot of missing features and bugs should be expected. --- Alternative string formatter for Elixir inspired by Python and Rust. ```elixir iex> use Format iex> Format.fmt(~F"{} {}", [1, "foo"]) [[[[]] | "1"], " ", "foo"]] iex> Format.string(~F"{} {}", [1, "foo"]) "1 foo" iex> Format.puts(~F"{} {}", [1, "foo"]) 1 foo :ok iex> Format.string(~F"{foo} {bar}", bar: 1, foo: 3) "3 1" iex> Format.string(~F"{foo:.3f} {foo:.5f}", foo: 3.2) "3.200 3.20000" iex> Format.string(~F"{0:^10d}|{0:<10x}|{0:>10b}", [100]) " 100 | 64|1100100 " ``` ## Installation If [available in Hex](https://hex.pm/docs/publish), the package can be installed by adding `format` to your list of dependencies in `mix.exs`: ```elixir def deps do [{:format, "~> 0.1.0"}] end ``` Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc) and published on [HexDocs](https://hexdocs.pm). Once published, the docs can be found at [https://hexdocs.pm/format](https://hexdocs.pm/format).