javascript remove diacritics
//Normalize diacritics characters from originalText
var originalText = "éàçèñ"
var result = originalText.normalize('NFD').replace(/[\u0300-\u036f]/g, "")
console.log(result)
javascript remove diacritics
//Normalize diacritics characters from originalText
var originalText = "éàçèñ"
var result = originalText.normalize('NFD').replace(/[\u0300-\u036f]/g, "")
console.log(result)
check if word has accented or unaccented javascript
var accentArray = ["á","à","ã","â","é","è","ê","í","ì","î","õ","ó","ò","ô","ú","ù","û"]
var stringToCheck = "áeiou"
for(var i=0; i < stringToCheck.length; i++){
for(var j=0; j < accentArray.length; j++){
if(stringToCheck[i] === accentArray[j]){
alert("String has accents!");
}
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us