summary refs log tree commit diff
path: root/src/util/String.ts
blob: bac7905f30f191b43bc4e3768e98cf025b64cdfb (plain) (blame)
1
2
3
4
5
6
7
import { DOUBLE_WHITE_SPACE, SPECIAL_CHAR } from "./Regex";

export function trimSpecial(str?: string): string {
	// @ts-ignore
	if (!str) return;
	return str.replace(SPECIAL_CHAR, "").replace(DOUBLE_WHITE_SPACE, " ").trim();
}