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

La méthode startsWith() renvoie un booléen indiquant si la chaine de caractères commence par la deuxième chaine de caractères fournie en argument.

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

Syntaxe

- -
str.startsWith(chaîneRecherchée [, position]);
- -

Paramètres

- -
-
chaîneRecherchée
-
Les caractères à rechercher au début de la chaine de caractères.
-
position {{optional_inline}}
-
La position à laquelle commencer la recherche de chaîneRecherchée ; par défaut 0.
-
- -

Valeur de retour

- -

true si la chaîne de caractères commence avec la sous-chaîne en argument, false sinon

- -

Description

- -

Cette méthode permet de savoir si une chaine de caractères commence avec une autre chaine de caractères (comme pour les autres méthodes fonctionnant avec les chaînes de caractères, cette méthode est sensible à la casse).

- -

Exemples

- -
var str = "Être, ou ne pas être : telle est la question.";
-
-console.log(str.startsWith("Être"));         // true
-console.log(str.startsWith("pas être"));     // false
-console.log(str.startsWith("pas être", 12)); // true
- -

Spécifications

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

Compatibilité des navigateurs

- -

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

- -

Voir aussi

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

La méthode startsWith() renvoie un booléen indiquant si la chaine de caractères commence par la deuxième chaine de caractères fournie en argument.

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

Syntaxe

+ +
str.startsWith(chaîneRecherchée [, position]);
+ +

Paramètres

+ +
+
chaîneRecherchée
+
Les caractères à rechercher au début de la chaine de caractères.
+
position {{optional_inline}}
+
La position à laquelle commencer la recherche de chaîneRecherchée ; par défaut 0.
+
+ +

Valeur de retour

+ +

true si la chaîne de caractères commence avec la sous-chaîne en argument, false sinon

+ +

Description

+ +

Cette méthode permet de savoir si une chaine de caractères commence avec une autre chaine de caractères (comme pour les autres méthodes fonctionnant avec les chaînes de caractères, cette méthode est sensible à la casse).

+ +

Exemples

+ +
var str = "Être, ou ne pas être : telle est la question.";
+
+console.log(str.startsWith("Être"));         // true
+console.log(str.startsWith("pas être"));     // false
+console.log(str.startsWith("pas être", 12)); // true
+ +

Spécifications

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

Compatibilité des navigateurs

+ +

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

+ +

Voir aussi

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