summary refs log tree commit diff
path: root/pkgs/lib/strings.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/lib/strings.nix')
-rw-r--r--pkgs/lib/strings.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkgs/lib/strings.nix b/pkgs/lib/strings.nix
index 8986d9c42d9..0e90b6f6477 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);
+}