From 4755ddd1262901bc7091595b00bc011a58a3112d Mon Sep 17 00:00:00 2001 From: Eman Resu <78693624+quatquatt@users.noreply.github.com> Date: Sat, 16 May 2026 00:58:33 -0400 Subject: [PATCH] lib.strings.{toSentenceCase,toCamelCase}: don't add context unnecessarily builtins.substring doesn't destroy context - it's not necessary to add it back. --- lib/strings.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/strings.nix b/lib/strings.nix index 0bb8e80799f8..f57df9d24380 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -1596,7 +1596,7 @@ rec { firstChar = substring 0 1 str; rest = substring 1 (-1) str; # -1 takes till the end of the string in - addContextFrom str (toUpper firstChar + toLower rest) + toUpper firstChar + toLower rest ); /** @@ -1653,7 +1653,7 @@ rec { first = if length parts > 0 then toLower (head parts) else ""; rest = if length parts > 1 then map toSentenceCase (tail parts) else [ ]; in - concatStrings (map (addContextFrom str) ([ first ] ++ rest)) + concatStrings ([ first ] ++ rest) ); /**