misskey-awawa/src/prelude/string.ts

4 lines
112 B
TypeScript
Raw Normal View History

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