Has anyone ever come up with a universal way to removed all control and special characters from stings in Miva Script?
Removing characters below char 32 and above char 127 does not work because some, but not all, of the codes are two bytes long.
Every example I find uses Regex expressions or functions built into the language.
Removing characters below char 32 and above char 127 does not work because some, but not all, of the codes are two bytes long.
Every example I find uses Regex expressions or functions built into the language.
Code:
Here are JavaScript examples: const str = "Crème Brulée" str.normalize("NFD").replace(/[\u0300-\u036f]/g, "") >"Creme Brulee" Or the more modern version: str.normalize("NFD").replace(/\p{Diacritic}/gu, "")
Comment