From 0ae8b365b35fa1c3cac700ce34b37012f96d7deb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 23 Jul 2015 17:41:35 +0200 Subject: Rename misc.nix -> deprecated.nix --- lib/strings.nix | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/strings.nix') diff --git a/lib/strings.nix b/lib/strings.nix index f0ecb15ab2d..895b230744f 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -210,6 +210,7 @@ rec { # standard GNU Autoconf scripts. enableFeature = enable: feat: "--${if enable then "enable" else "disable"}-${feat}"; + # Create a fixed width string with additional prefix to match required width fixedWidthString = width: filler: str: let @@ -219,6 +220,7 @@ rec { assert strw <= width; if strw == width then str else filler + fixedWidthString reqWidth filler str; + # Format a number adding leading zeroes up to fixed width fixedWidthNumber = width: n: fixedWidthString width "0" (toString n); } -- cgit 1.4.1