jormungandr-bite/packages/backend/src/prelude/string.ts

16 lines
335 B
TypeScript
Raw Normal View History

2018-11-08 21:03:46 -07:00
export function concat(xs: string[]): string {
2023-01-12 21:40:33 -07:00
return xs.join("");
2018-11-08 21:03:46 -07:00
}
2018-09-06 12:22:55 -06:00
export function capitalize(s: string): string {
2018-09-11 15:33:02 -06:00
return toUpperCase(s.charAt(0)) + toLowerCase(s.slice(1));
2018-09-11 12:51:33 -06:00
}
export function toUpperCase(s: string): string {
return s.toUpperCase();
2018-09-06 12:22:55 -06:00
}
2018-09-11 15:33:02 -06:00
export function toLowerCase(s: string): string {
return s.toLowerCase();
}