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

title: Nix string padding

date: 2018-07-13

layout: post

lang: en

eu_categories: nix

---

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