From 9abff7a85ec47613cd701c4b319fc6fe8fed4fae Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Sat, 9 Feb 2013 18:38:26 +0100 Subject: Major Xfce refactoring, also adding versions 4.10.* Please, comment on #296. --- pkgs/lib/strings.nix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'pkgs/lib/strings.nix') diff --git a/pkgs/lib/strings.nix b/pkgs/lib/strings.nix index 19d1738182f..4d899927887 100644 --- a/pkgs/lib/strings.nix +++ b/pkgs/lib/strings.nix @@ -109,6 +109,13 @@ rec { stringAsChars subst s; + # Case conversion utilities + lowerChars = stringToCharacters "abcdefghijklmnopqrstuvwxyz"; + upperChars = stringToCharacters "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + toLower = replaceChars upperChars lowerChars; + toUpper = replaceChars lowerChars upperChars; + + # 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); -- cgit 1.4.1