// The normalize() method returns the Unicode Normalization Form of the string.
const name1 = 'u0041u006du00e9u006cu0069u0065';
const name2 = 'u0041u006du0065u0301u006cu0069u0065';
console.log(`${name1}, ${name2}`);
// expected output: "Amélie, Amélie"
console.log(name1 === name2);
// expected output: false
console.log(name1.length === name2.length);
// expected output: false
const name1NFC = name1.normalize('NFC');
const name2NFC = name2.normalize('NFC');
console.log(`${name1NFC}, ${name2NFC}`);
// expected output: "Amélie, Amélie"
console.log(name1NFC === name2NFC);
// expected output: true
console.log(name1NFC.length === name2NFC.length);
// expected output: true
<script>
var a = "Geeks For Geeks";
b = a.normalize('NFC')
c = a.normalize('NFD')
d = a.normalize('NFKC')
e = a.normalize('NFKD')
document.write(b,c,d,e);
</script>
Code Example |
---|
:: nodejs set dns for request |
Javascript :: |
Javascript :: js count word |
:: |
:: |
Javascript :: sanitize data within an Express application |
Javascript :: react-native-restart |
:: |
:: |
Javascript :: javascript remove required attribute |
:: |
:: redux saga fetch api |
Javascript :: hosting react with pm2 |
:: chart js donut |
:: |
:: react context api |
:: |
Javascript :: javascript parseint |
:: |
Javascript :: momentjs get calendar week |
:: Uncaught (in promise) Error: Redirected when going from "/login" to "/" via a navigation guard. |
:: how to send js array from ajax |
Javascript :: salvar no localStorage react |
:: |
:: |
:: |
:: |
Javascript :: |
:: |
:: JavaScript then() method |