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/trimend/index.html | 79 ---------------------- .../global_objects/string/trimend/index.md | 79 ++++++++++++++++++++++ 2 files changed, 79 insertions(+), 79 deletions(-) delete mode 100644 files/fr/web/javascript/reference/global_objects/string/trimend/index.html create mode 100644 files/fr/web/javascript/reference/global_objects/string/trimend/index.md (limited to 'files/fr/web/javascript/reference/global_objects/string/trimend') diff --git a/files/fr/web/javascript/reference/global_objects/string/trimend/index.html b/files/fr/web/javascript/reference/global_objects/string/trimend/index.html deleted file mode 100644 index 3f3ea377c8..0000000000 --- a/files/fr/web/javascript/reference/global_objects/string/trimend/index.html +++ /dev/null @@ -1,79 +0,0 @@ ---- -title: String.prototype.trimEnd() -slug: Web/JavaScript/Reference/Global_Objects/String/trimEnd -tags: - - JavaScript - - Méthode - - Prototype - - Reference - - String -translation_of: Web/JavaScript/Reference/Global_Objects/String/trimEnd -original_slug: Web/JavaScript/Reference/Objets_globaux/String/trimEnd ---- -
{{JSRef}}
- -

La méthode trimEnd() permet de retirer les blancs situés à la fin d'une chaîne de caractères. trimRight() est un synonyme pour cette méthode.

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

Syntaxe

- -
str.trimEnd();
-str.trimRight();
- -

Valeur de retour

- -

Une nouvelle chaîne de caractères basée sur la chaîne appelante et dont les blancs en fin de chaîne ont été supprimés.

- -

Description

- -

La méthode trimEnd() renvoie la chaîne de caractères sans les blancs présents à partir de la droite de la chaîne. trimEnd() ne modifie pas la chaîne elle-même.

- -

Synonyme

- -

Pour des raisons de cohérence avec les méthodes existantes comme {{jsxref("String.prototype.padEnd")}}, le nom standard de cette méthode est trimEnd. Toutefois, à des fins de compatibilité web, trimRight est un synonyme de trimEnd. Pour certains moteurs JavaScript, on pourra donc avoir :

- -
String.prototype.trimRight.name === "trimEnd";
- -

Exemples

- -

L'exemple qui suit illustre comment afficher la chaîne "   toto":

- -
var str = "   toto  ";
-
-console.log(str.length); // 9
-
-str = str.trimEnd();
-console.log(str.length); // 7
-console.log(str);        // "   toto"
-
- -

Spécifications

- - - - - - - - - - - - - - - - -
SpécificationÉtatCommentaires
Proposition pour String.prototype.{trimStart,trimEnd}Brouillon de niveau 4Attendu pour ES2019
- -

Compatibilité des navigateurs

- -

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

- -

Voir aussi

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

La méthode trimEnd() permet de retirer les blancs situés à la fin d'une chaîne de caractères. trimRight() est un synonyme pour cette méthode.

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

Syntaxe

+ +
str.trimEnd();
+str.trimRight();
+ +

Valeur de retour

+ +

Une nouvelle chaîne de caractères basée sur la chaîne appelante et dont les blancs en fin de chaîne ont été supprimés.

+ +

Description

+ +

La méthode trimEnd() renvoie la chaîne de caractères sans les blancs présents à partir de la droite de la chaîne. trimEnd() ne modifie pas la chaîne elle-même.

+ +

Synonyme

+ +

Pour des raisons de cohérence avec les méthodes existantes comme {{jsxref("String.prototype.padEnd")}}, le nom standard de cette méthode est trimEnd. Toutefois, à des fins de compatibilité web, trimRight est un synonyme de trimEnd. Pour certains moteurs JavaScript, on pourra donc avoir :

+ +
String.prototype.trimRight.name === "trimEnd";
+ +

Exemples

+ +

L'exemple qui suit illustre comment afficher la chaîne "   toto":

+ +
var str = "   toto  ";
+
+console.log(str.length); // 9
+
+str = str.trimEnd();
+console.log(str.length); // 7
+console.log(str);        // "   toto"
+
+ +

Spécifications

+ + + + + + + + + + + + + + + + +
SpécificationÉtatCommentaires
Proposition pour String.prototype.{trimStart,trimEnd}Brouillon de niveau 4Attendu pour ES2019
+ +

Compatibilité des navigateurs

+ +

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

+ +

Voir aussi

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