From 844f5103992238c0c23203286dad16a466e89c97 Mon Sep 17 00:00:00 2001 From: julieng Date: Tue, 3 Aug 2021 08:03:09 +0200 Subject: move *.html to *.md --- .../global_objects/string/normalize/index.html | 124 --------------------- .../global_objects/string/normalize/index.md | 124 +++++++++++++++++++++ 2 files changed, 124 insertions(+), 124 deletions(-) delete mode 100644 files/fr/web/javascript/reference/global_objects/string/normalize/index.html create mode 100644 files/fr/web/javascript/reference/global_objects/string/normalize/index.md (limited to 'files/fr/web/javascript/reference/global_objects/string/normalize') diff --git a/files/fr/web/javascript/reference/global_objects/string/normalize/index.html b/files/fr/web/javascript/reference/global_objects/string/normalize/index.html deleted file mode 100644 index b35ff15f8b..0000000000 --- a/files/fr/web/javascript/reference/global_objects/string/normalize/index.html +++ /dev/null @@ -1,124 +0,0 @@ ---- -title: String.prototype.normalize() -slug: Web/JavaScript/Reference/Global_Objects/String/normalize -tags: - - ECMAScript 2015 - - JavaScript - - Méthode - - Prototype - - Reference - - String - - Unicode -translation_of: Web/JavaScript/Reference/Global_Objects/String/normalize -original_slug: Web/JavaScript/Reference/Objets_globaux/String/normalize ---- -
{{JSRef}}
- -

La méthode normalize() permet de renvoyer la forme normalisée Unicode d'une chaîne de caractères (si la valeur n'est pas une chaîne de caractères, elle sera convertie).

- -
{{EmbedInteractiveExample("pages/js/string-normalize.html")}}
- -

Syntaxe

- -
str.normalize([form]);
- -

Paramètres

- -
-
form
-
Paramètre optionnel. Une chaîne parmi "NFC", "NFD", "NFKC", ou "NFKD", définissant la forme de normalisation Unicode à utiliser. Si le paramètre n'est pas précisé ou vaut {{jsxref("undefined")}}, la valeur par défaut utilisée sera "NFC". -
    -
  • NFC - Normalization Form Canonical Composition.
  • -
  • NFD - Normalization Form Canonical Decomposition.
  • -
  • NFKC - Normalization Form Compatibility Composition.
  • -
  • NFKD - Normalization Form Compatibility Decomposition.
  • -
-
-
- -

Valeur de retour

- -

Une chaîne de caractères qui est le forme Unicode normalisée de la chaîne appelante.

- -

Exceptions

- -
-
{{jsxref("RangeError")}}
-
Une exception RangeError est envoyée si le paramètre form n'est pas une des valeurs définies ci-avant.
-
- -

Description

- -

La méthode normalize() renvoie la forme normalisée Unicode de la chaîne de caractères. Elle n'affecte pas la valeur de la chaîne.

- -

Exemples

- -
// Chaîne initiale
-
-// U+1E9B: LATIN SMALL LETTER LONG S WITH DOT ABOVE
-// U+0323: COMBINING DOT BELOW
-var str = "\u1E9B\u0323";
-
-
-// Forme canonique composée (Canonically-composed form) (NFC)
-
-// U+1E9B: LATIN SMALL LETTER LONG S WITH DOT ABOVE
-// U+0323: COMBINING DOT BELOW
-str.normalize("NFC"); // "\u1E9B\u0323"
-str.normalize(); // la même chaîne que précédemment
-
-
-// Forme canonique décomposée (Canonically-decomposed form) (NFD)
-
-// U+017F: LATIN SMALL LETTER LONG S
-// U+0323: COMBINING DOT BELOW
-// U+0307: COMBINING DOT ABOVE
-str.normalize("NFD"); // "\u017F\u0323\u0307"
-
-
-// Forme composée compatible (NFKC)
-
-// U+1E69: LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE
-str.normalize("NFKC"); // "\u1E69"
-
-
-// Forme décomposée compatible (NFKD)
-
-// U+0073: LATIN SMALL LETTER S
-// U+0323: COMBINING DOT BELOW
-// U+0307: COMBINING DOT ABOVE
-str.normalize("NFKD"); // "\u0073\u0323\u0307"
-
- -

Spécifications

- - - - - - - - - - - - - - - - - - - -
SpécificationÉtatCommentaires
{{SpecName('ES2015', '#sec-string.prototype.normalize', 'String.prototype.normalize')}}{{Spec2('ES2015')}}Définition initiale.
{{SpecName('ESDraft', '#sec-string.prototype.normalize', 'String.prototype.normalize')}}{{Spec2('ESDraft')}} 
- -

Compatibilité des navigateurs

- -

{{Compat("javascript.builtins.String.normalize")}}

- -

Voir aussi

- - diff --git a/files/fr/web/javascript/reference/global_objects/string/normalize/index.md b/files/fr/web/javascript/reference/global_objects/string/normalize/index.md new file mode 100644 index 0000000000..b35ff15f8b --- /dev/null +++ b/files/fr/web/javascript/reference/global_objects/string/normalize/index.md @@ -0,0 +1,124 @@ +--- +title: String.prototype.normalize() +slug: Web/JavaScript/Reference/Global_Objects/String/normalize +tags: + - ECMAScript 2015 + - JavaScript + - Méthode + - Prototype + - Reference + - String + - Unicode +translation_of: Web/JavaScript/Reference/Global_Objects/String/normalize +original_slug: Web/JavaScript/Reference/Objets_globaux/String/normalize +--- +
{{JSRef}}
+ +

La méthode normalize() permet de renvoyer la forme normalisée Unicode d'une chaîne de caractères (si la valeur n'est pas une chaîne de caractères, elle sera convertie).

+ +
{{EmbedInteractiveExample("pages/js/string-normalize.html")}}
+ +

Syntaxe

+ +
str.normalize([form]);
+ +

Paramètres

+ +
+
form
+
Paramètre optionnel. Une chaîne parmi "NFC", "NFD", "NFKC", ou "NFKD", définissant la forme de normalisation Unicode à utiliser. Si le paramètre n'est pas précisé ou vaut {{jsxref("undefined")}}, la valeur par défaut utilisée sera "NFC". +
    +
  • NFC - Normalization Form Canonical Composition.
  • +
  • NFD - Normalization Form Canonical Decomposition.
  • +
  • NFKC - Normalization Form Compatibility Composition.
  • +
  • NFKD - Normalization Form Compatibility Decomposition.
  • +
+
+
+ +

Valeur de retour

+ +

Une chaîne de caractères qui est le forme Unicode normalisée de la chaîne appelante.

+ +

Exceptions

+ +
+
{{jsxref("RangeError")}}
+
Une exception RangeError est envoyée si le paramètre form n'est pas une des valeurs définies ci-avant.
+
+ +

Description

+ +

La méthode normalize() renvoie la forme normalisée Unicode de la chaîne de caractères. Elle n'affecte pas la valeur de la chaîne.

+ +

Exemples

+ +
// Chaîne initiale
+
+// U+1E9B: LATIN SMALL LETTER LONG S WITH DOT ABOVE
+// U+0323: COMBINING DOT BELOW
+var str = "\u1E9B\u0323";
+
+
+// Forme canonique composée (Canonically-composed form) (NFC)
+
+// U+1E9B: LATIN SMALL LETTER LONG S WITH DOT ABOVE
+// U+0323: COMBINING DOT BELOW
+str.normalize("NFC"); // "\u1E9B\u0323"
+str.normalize(); // la même chaîne que précédemment
+
+
+// Forme canonique décomposée (Canonically-decomposed form) (NFD)
+
+// U+017F: LATIN SMALL LETTER LONG S
+// U+0323: COMBINING DOT BELOW
+// U+0307: COMBINING DOT ABOVE
+str.normalize("NFD"); // "\u017F\u0323\u0307"
+
+
+// Forme composée compatible (NFKC)
+
+// U+1E69: LATIN SMALL LETTER S WITH DOT BELOW AND DOT ABOVE
+str.normalize("NFKC"); // "\u1E69"
+
+
+// Forme décomposée compatible (NFKD)
+
+// U+0073: LATIN SMALL LETTER S
+// U+0323: COMBINING DOT BELOW
+// U+0307: COMBINING DOT ABOVE
+str.normalize("NFKD"); // "\u0073\u0323\u0307"
+
+ +

Spécifications

+ + + + + + + + + + + + + + + + + + + +
SpécificationÉtatCommentaires
{{SpecName('ES2015', '#sec-string.prototype.normalize', 'String.prototype.normalize')}}{{Spec2('ES2015')}}Définition initiale.
{{SpecName('ESDraft', '#sec-string.prototype.normalize', 'String.prototype.normalize')}}{{Spec2('ESDraft')}} 
+ +

Compatibilité des navigateurs

+ +

{{Compat("javascript.builtins.String.normalize")}}

+ +

Voir aussi

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