diff options
author | EuAndreh <eu@euandre.org> | 2020-10-10 14:51:52 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-10-10 14:57:40 -0300 |
commit | d8e400c40c970996599c801974fadb6d49e60fdd (patch) | |
tree | 1920204911c4931635f569ad629b9dea73dfbec8 /_pastebins/2018-07-13-nix-string-padding.md | |
parent | Refactor i18n structure, remove layouts, add slides (diff) | |
download | euandre.org-d8e400c40c970996599c801974fadb6d49e60fdd.tar.gz euandre.org-d8e400c40c970996599c801974fadb6d49e60fdd.tar.xz |
Enforce all "post" and "pastebin" layouts have dates in filenames
Diffstat (limited to '_pastebins/2018-07-13-nix-string-padding.md')
-rw-r--r-- | _pastebins/2018-07-13-nix-string-padding.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/_pastebins/2018-07-13-nix-string-padding.md b/_pastebins/2018-07-13-nix-string-padding.md new file mode 100644 index 0000000..8de9048 --- /dev/null +++ b/_pastebins/2018-07-13-nix-string-padding.md @@ -0,0 +1,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) +``` |