summaryrefslogtreecommitdiffstats
path: root/lib/default.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2023-02-05 00:47:55 +0100
committertv <tv@krebsco.de>2023-02-05 01:40:20 +0100
commitf802eaf7847eb7bd1b8a735dac5166fa8999ea06 (patch)
tree757041cf85e88a589b09f7e614d8b9d83500f539 /lib/default.nix
parent377840226c448fd44f616b77e6057cd414f12480 (diff)
lib.hexchars: init
Diffstat (limited to 'lib/default.nix')
-rw-r--r--lib/default.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/default.nix b/lib/default.nix
index 280f04299..187514a30 100644
--- a/lib/default.nix
+++ b/lib/default.nix
@@ -45,6 +45,8 @@ let
genid_uint31 = x: ((lib.genid_uint32 x) + 16777216) / 2;
genid_uint32 = import ./genid.nix { inherit lib; };
+ hexchars = stringToCharacters "0123456789abcdef";
+
lpad = n: c: s:
if lib.stringLength s < n
then lib.lpad n c (c + s)