mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-13 10:44:34 +02:00
lib: add upperFirstChar
A util function to capitalize the first character of a string.
This commit is contained in:
parent
36f2e51b28
commit
c16533b3f7
2 changed files with 42 additions and 0 deletions
|
@ -113,6 +113,23 @@ let
|
|||
};
|
||||
expected = ''{["c"] = { },["d"] = {["g"] = { }}}'';
|
||||
};
|
||||
|
||||
testUpperFirstChar = {
|
||||
expr = map helpers.upperFirstChar [
|
||||
"foo"
|
||||
" foo"
|
||||
"foo bar"
|
||||
"UPPER"
|
||||
"mIxEd"
|
||||
];
|
||||
expected = [
|
||||
"Foo"
|
||||
" foo"
|
||||
"Foo bar"
|
||||
"UPPER"
|
||||
"MIxEd"
|
||||
];
|
||||
};
|
||||
};
|
||||
in
|
||||
if results == [ ] then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue