Sharkey/src/prelude/string.ts

4 lines
112 B
TypeScript
Raw Normal View History

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