Add trimNonLatin function to trim non-Latin characters from chara.desc
This commit is contained in:
@@ -1472,4 +1472,10 @@ export function textifyReadableStream(stream:ReadableStream<Uint8Array>){
|
||||
|
||||
export function toggleFullscreen(){
|
||||
document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen()
|
||||
}
|
||||
|
||||
export function trimNonLatin(data:string){
|
||||
return data .replace(/[^\x00-\x7F]/g, "")
|
||||
.replace(/ +/g, ' ')
|
||||
.trim()
|
||||
}
|
||||
Reference in New Issue
Block a user