Add capitalize function (#2651)

This commit is contained in:
Aya Morisawa
2018-09-07 03:22:55 +09:00
committed by syuilo
parent 769960f29e
commit c6ff6939a5
2 changed files with 6 additions and 1 deletions

3
src/prelude/string.ts Normal file
View File

@ -0,0 +1,3 @@
export function capitalize(s: string): string {
return s.charAt(0).toUpperCase() + s.slice(1).toLowerCase();
}