19 lines
523 B
TypeScript
19 lines
523 B
TypeScript
|
/**
|
||
|
* This function converts german umlauts back.
|
||
|
*
|
||
|
* @param text
|
||
|
*
|
||
|
* @returns {string} The whole text with german umlauts.
|
||
|
*/
|
||
|
export function reconvertChars(text: string): string {
|
||
|
return text
|
||
|
.replace(/ä|ä/g, 'ä')
|
||
|
.replace(/Ä|Ä/g, 'Ä')
|
||
|
.replace(/ö|ö/g, 'ö')
|
||
|
.replace(/Ö|Ö/g, 'Ö')
|
||
|
.replace(/ü/g, 'ü')
|
||
|
.replace(/Ü/g, 'Ü')
|
||
|
.replace(/å|å/g, 'å')
|
||
|
.replace(/Å|Å/g, 'Å');
|
||
|
}
|