egirlskey/packages/backend/src/misc/prelude/string.ts

21 lines
439 B
TypeScript
Raw Normal View History

/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
2018-11-09 04:03:46 +00:00
export function concat(xs: string[]): string {
2018-12-24 08:02:03 +00:00
return xs.join('');
2018-11-09 04:03:46 +00:00
}
2018-09-06 18:22:55 +00:00
export function capitalize(s: string): string {
2018-09-11 21:33:02 +00:00
return toUpperCase(s.charAt(0)) + toLowerCase(s.slice(1));
2018-09-11 18:51:33 +00:00
}
export function toUpperCase(s: string): string {
return s.toUpperCase();
2018-09-06 18:22:55 +00:00
}
2018-09-11 21:33:02 +00:00
export function toLowerCase(s: string): string {
return s.toLowerCase();
}