aboutsummaryrefslogblamecommitdiff
path: root/_pastebins/2018-07-13-nix-string-padding.md
blob: 8de9048d891b944d917925d572ceac2a39a8e748 (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                                                
---
title: Nix string padding
date: 2018-07-13
layout: pastebin
lang: en
---

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