aboutsummaryrefslogtreecommitdiff
path: root/_pastebins/2018-07-13-nix-string-padding.md
blob: 359bda59820345601b547a561d027c0518ff4d68 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
---

title: Nix string padding

date: 2018-07-13

layout: post

lang: en

eu_categories: nix

ref: nix-string-padding

---

```nix
padString = (n: if n < 10 then "0" + toString n else toString n)
```