This commit is contained in:
bracesproul
2025-03-05 11:39:23 -08:00
parent 837fe86970
commit e710b64dc7
4 changed files with 23 additions and 12 deletions

View File

@@ -2,9 +2,12 @@
* Capitalizes the first letter of each word in a string.
*/
export function capitalizeSentence(string: string): string {
return string.split(' ').map(word => {
return word.charAt(0).toUpperCase() + word.slice(1);
}).join(' ');
return string
.split(" ")
.map((word) => {
return word.charAt(0).toUpperCase() + word.slice(1);
})
.join(" ");
}
/**