lib.strings.toSentenceCase: use -1 trick instead of computing stringLength

This commit is contained in:
Eman Resu
2026-05-15 23:45:25 -04:00
parent f908b7a78c
commit 4a438d1a8a
+1 -1
View File
@@ -1594,7 +1594,7 @@ rec {
(
let
firstChar = substring 0 1 str;
rest = substring 1 (stringLength str) str;
rest = substring 1 (-1) str; # -1 takes till the end of the string
in
addContextFrom str (toUpper firstChar + toLower rest)
);