PortValhalla/lib/text.nix

10 lines
244 B
Nix
Raw Normal View History

2024-08-08 13:28:29 +00:00
{ 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)
);
}