PortValhalla/lib/text.nix

8 lines
218 B
Nix
Raw Permalink Normal View History

2024-08-08 13:28:29 +00:00
{ lib, ... }: {
2024-10-06 19:25:34 +00:00
capitalize = text:
let chars = lib.strings.stringToCharacters text;
in lib.strings.concatStrings
([ (lib.strings.toUpper (builtins.elemAt chars 0)) ]
++ (lib.lists.drop 1 chars));
2024-08-08 13:28:29 +00:00
}