export function escapeXML (input: string): string {
  if (input.match(/[&<>"\n]/)) return input
    .replaceAll("&", "&amp;")
    .replaceAll("<", "&lt;")
    .replaceAll(">", "&gt;")
    .replaceAll(`"`, "&quot;")
    .replaceAll("\n", "&#13;&#10;");
  return input;
}

export function capitalize (str: string): string {
  return str[0].toUpperCase() + str.slice(1);
}