Add single-user password utils (#9)

- Constrain images to reading viewport
This commit is contained in:
2024-04-27 16:34:59 -04:00
parent 0df40f3cfd
commit 9611893da3
6 changed files with 75 additions and 25 deletions

View File

@@ -28,3 +28,17 @@ function cli_title(string $title): void {
printfn(' | %s | %s |', $title, $appTitle);
printfn($dashes . PHP_EOL);
}
/**
* Capitalize the first letter of the given string
*
* @param string $value The string to be capitalized
* @return string The given string with the first letter capitalized
*/
function init_cap(string $value): string {
return match (strlen($value)) {
0 => "",
1 => strtoupper($value),
default => strtoupper(substr($value, 0, 1)) . substr($value, 1),
};
}