String normalize() method

Find out all the information about the JavaScript normalize() method of the string

Unicode has four main aspectsNormalized form. Their code isNFC,NFD,NFKC,NFKD.href="Encyclopedia has a good explanation of the topic.

Thisnormalize()The method returns a string standardized according to the form you specify, and you pass the form as a parameter (NFCIf this parameter is not set, it is the default value).

I will reuse the MDN example because I'm sure there is a valid usage, but I can't find other examples:

'\u1E9B\u0323'.normalize() //ẛ̣
'\u1E9B\u0323'.normalize('NFD') //ẛ̣
'\u1E9B\u0323'.normalize('NFKD') //ṩ
'\u1E9B\u0323'.normalize('NFKC') //ṩ

Download mine for freeJavaScript beginner's manual


More js tutorials: