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

La méthode trimStart() permet de retirer les blancs au début de la chaîne de caractères. trimLeft() est un synonyme pour cette méthode.

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

Syntaxe

- -
str.trimStart();
-str.trimLeft();
- -

Valeur de retour

- -

Une nouvelle chaîne de caractères dérivant de la chaîne appelante pour laquelle les blancs en début de chaîne ont été retirés.

- -

Description

- -

La méthode trimStart() renvoie la chaîne de caractères dont les blancs à gauche ont été retirés. trimStart ne modifie pas la chaîne elle-même.

- -

Synonyme

- -

Pour des raisons de cohérences avec les méthodes préexistantes (telles que {{jsxref("String.prototype.padStart")}}), le nom standard de cette méthode est trimStart. Toutefois, à des fins de compatibilité web, le nom trimLeft sera gardé comme un synonyme. Pour certains moteurs JavaScript, on pourra donc avoir :

- -
String.prototype.trimLeft.name === "trimStart";
- -

Exemple

- -

L'exemple qui suit illustre comment afficher la chaîne de caractères "toto  " en minuscules :

- -
var str = "   toto  ";
-
-console.log(str.length); // 8
-
-str = str.trimStart();
-console.log(str.length); // 5
-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.trimStart")}}

- -

Voir aussi

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