!tDnwWRNkmmYtMXfaZl:nixos.org

Nix Language

1520 Members
Nix programming language267 Servers

Load older messages


SenderMessageTime
22 Oct 2024
@ihar.hrachyshka:matrix.orgIhar Hrachyshka

is there a lib function to upper-case the first character in a string? I have

mutFirstChar =
    f: s:
    let
      firstChar = f (lib.substring 0 1 s);
      rest = lib.substring 1 (-1) s;
    in
    firstChar + rest;
  toTitle = s: mutFirstChar lib.toUpper s;
  darwinAppName = toTitle binaryName + ".app";

but I feel like there probably should be a builtin for this?

01:07:30
@klaw:matrix.org@klaw:matrix.org joined the room.02:57:03
@klaw:matrix.org@klaw:matrix.org left the room.03:04:35
@human:nitro.chathuman joined the room.04:49:36

There are no newer messages yet.


Back to Room ListRoom Version: 6