aboutsummaryrefslogblamecommitdiff
path: root/src/content/pastebins/2018/07/13/nix-strpad.adoc
blob: 359bda59820345601b547a561d027c0518ff4d68 (plain) (tree)
1
2
3
4
5
6
7
8
9
   
 
                         
 
                
 
            
 
        


                  

                       




                                                                
---

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)
```