summaryrefslogtreecommitdiff
path: root/src/prelude/string.ts
blob: 6149235e478fd0be878b213fadf9ac7cf9378899 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
export function concat(xs: string[]): string {
	return xs.reduce((a, b) => a + b, "");
}

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

export function toUpperCase(s: string): string {
	return s.toUpperCase();
}

export function toLowerCase(s: string): string {
	return s.toLowerCase();
}