From 95aca4b4d8fa62815d4bd412fff1a364f842814a Mon Sep 17 00:00:00 2001 From: Ryan Johnson Date: Thu, 29 Apr 2021 16:16:42 -0700 Subject: remove retired locales (#699) --- .../global_objects/string/fromcharcode/index.html | 127 --------------------- 1 file changed, 127 deletions(-) delete mode 100644 files/ca/web/javascript/reference/global_objects/string/fromcharcode/index.html (limited to 'files/ca/web/javascript/reference/global_objects/string/fromcharcode') diff --git a/files/ca/web/javascript/reference/global_objects/string/fromcharcode/index.html b/files/ca/web/javascript/reference/global_objects/string/fromcharcode/index.html deleted file mode 100644 index e168171699..0000000000 --- a/files/ca/web/javascript/reference/global_objects/string/fromcharcode/index.html +++ /dev/null @@ -1,127 +0,0 @@ ---- -title: String.fromCharCode() -slug: Web/JavaScript/Reference/Global_Objects/String/fromCharCode -translation_of: Web/JavaScript/Reference/Global_Objects/String/fromCharCode -original_slug: Web/JavaScript/Referencia/Objectes_globals/String/fromCharCode ---- -
{{JSRef}}
- -

El mètode estàtic String.fromCharCode() retorna un string creat a partir de la seqüència de valors Unicode especificada.

- -

Sintaxi

- -
String.fromCharCode(num1[, ...[, numN]])
- -

Paràmetres

- -
-
num1, ..., numN
-
Una seqüència de nombres que són valors Unicode.
-
- -

Descripció

- -

Aquest mètode retorna un string i no un objecte de tipus {{jsxref("String")}}.

- -

Com que fromCharCode() és un mètode estàtic de {{jsxref("String")}}, sempre s'utilitza com String.fromCharCode() en comptes de com un mètode d'un objecte {{jsxref("String")}} creat.

- -

Exemples

- -

Utilitzar fromCharCode()

- -

L'exemple següent retorna el string "ABC".

- -
String.fromCharCode(65, 66, 67);  // "ABC"
-
- -

Fer que funcioni amb valors més grans

- -

Tot i que la majoria dels valors Unicode es poden representar amb un nombre de 16 bits (tal i com s'esperava mentre s'estava estandaritzant el JavaScript) i es pot emprar fromCharCode() per a retornar un sol caràcter per als valors més comuns (com ara valors UCS-2, que són un subconjunt de l'UTF-16 amb els caràcters més comuns), per a poder manegar TOTS els valors legals Unicode (els quals requereixen fins a 21 bits),  l'ús de només fromCharCode() no és adequat ja que els caràcters de valor més alt utilitzen dos nombres "substituts" (de menor valor) per a formar un sol caràcter. Es pot emprar {{jsxref("String.fromCodePoint()")}} (que forma part de l'esborrant de l'ECMAScript 6) per a retornar el parell de nombres citat i, d'aquesta forma, representar de manera adequada aquests caràcters de valor més alt.

- -

Especificacions

- - - - - - - - - - - - - - - - - - - - - - - - -
EspecificacionsEstatComentaris
{{SpecName('ES1')}}{{Spec2('ES1')}}Definició inicial. Implementat a JavaScript 1.2.
{{SpecName('ES5.1', '#sec-15.5.3.2', 'StringfromCharCode')}}{{Spec2('ES5.1')}} 
{{SpecName('ES6', '#sec-string.fromcharcodes', 'String.fromCharCode')}}{{Spec2('ES6')}} 
- -

Compatibilitat amb navegadors

- -
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - -
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
CaracterísticaAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suport bàsic{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
-
- -

Vegeu també

- - -- cgit v1.2.3-54-g00ecf