rudeshark.net/src/prelude/string.ts

4 lines
112 B
TypeScript
Raw Normal View History

2018-09-06 20:22:55 +02:00
export function capitalize(s: string): string {
return s.charAt(0).toUpperCase() + s.slice(1).toLowerCase();
}