From 8bf73286a47a405b1ff36ac0095b7c96e9a0f7b6 Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Tue, 24 Feb 2009 16:19:08 +0000 Subject: [PATCH] add eqStrings back.. svn path=/nixpkgs/trunk/; revision=14228 --- pkgs/lib/strings.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/lib/strings.nix b/pkgs/lib/strings.nix index 8986d9c42d98..0e90b6f64771 100644 --- a/pkgs/lib/strings.nix +++ b/pkgs/lib/strings.nix @@ -81,5 +81,7 @@ rec { else takeTillSlash (__sub left 1) (__add c 1) s; in takeTillSlash (__sub (__stringLength s) 1) 1 s; - -} \ No newline at end of file + # Compares strings not requiring context equality + # Obviously, a workaround but works on all Nix versions + eqStrings = a: b: (a+(substring 0 0 b)) == ((substring 0 0 a)+b); +}