fromCodePoint

fromCodePoint

> Fonctions

Renvoie la chaîne d'un seul caractère dont le codepoint unicode est codePoint : fromCodePoint(65) renvoie "A". C'est l'inverse de codePointAt.

Les codepoints au-delà de 65535 donnent des caractères comme les émojis : fromCodePoint(128040) renvoie "🐨".

fromCodePoint(65)                // "A"
fromCodePoint(233)               // "é"
fromCodePoint(9835)              // "♫"
fromCodePoint(128040)            // "🐨"
fromCodePoint(codePointAt("é"))  // "é"
fromCodePoint(-1)                // null
fromCodePoint(0x110000)          // null
String.fromCodePoint(65)       // "A"
String.fromCodePoint(128040)   // "🐨"
chr(65)       # 'A'
chr(128040)   # '🐨'
Paramètres
Retour
Note