PortValhalla/lib/text.nix
2024-10-06 21:25:34 +02:00

8 lines
218 B
Nix

{ lib, ... }: {
capitalize = text:
let chars = lib.strings.stringToCharacters text;
in lib.strings.concatStrings
([ (lib.strings.toUpper (builtins.elemAt chars 0)) ]
++ (lib.lists.drop 1 chars));
}