diff options
Diffstat (limited to 'files/fr/web/xpath/functions/string/index.md')
-rw-r--r-- | files/fr/web/xpath/functions/string/index.md | 66 |
1 files changed, 35 insertions, 31 deletions
diff --git a/files/fr/web/xpath/functions/string/index.md b/files/fr/web/xpath/functions/string/index.md index 1345b8ba5f..bf566b4a3c 100644 --- a/files/fr/web/xpath/functions/string/index.md +++ b/files/fr/web/xpath/functions/string/index.md @@ -6,35 +6,39 @@ tags: translation_of: Web/XPath/Functions/string original_slug: Web/XPath/Fonctions/string --- -<p> {{ XsltRef() }} -</p><p><br> -La fonction <code>string</code> convertit l'argument passé en une chaîne. -</p> -<h3 id="Syntaxe">Syntaxe </h3> -<pre class="eval">string( [<i>objet</i>] ) -</pre> -<h3 id="Arguments"> Arguments </h3> -<dl><dt><code><i>objet</i></code> (optionnel) -</dt><dd>L'objet à convertir en une chaîne. Si il est omis, le nœud du contexte est utilisé. -</dd></dl> -<h3 id="Retour"> Retour </h3> -<p>Une chaîne. -</p> -<h3 id="Notes"> Notes </h3> -<ul><li> Si l'objet est un ensemble de nœuds, la valeur de la chaîne du premier nœud de l'ensemble est retournée. -</li><li> Un nombre est converti comme suit : -<ul><li> NaN est converti en la chaîne <code>NaN</code>. -</li><li> Zéro positif est converti en <code>0</code>. -</li><li> Zéro négatif est converti en <code>0</code>. -</li><li> Infini positif est converti en la chaîne <code>Infinity</code>. -</li><li> Infini négatif est converti en la chaîne <code>-Infinity</code>. -</li><li> Les nombres décimaux entre -1 et 1 sont convertis en chaîne comportant un unique 0 avant le séparateur décimale. -</li></ul> -</li></ul> -<h3 id="D.C3.A9finition"> Définition </h3> -<p><a href="http://www.w3.org/TR/xpath#function-string">XPath 1.0, section 4.2</a>. -</p> -<h3 id="Support_Gecko"> Support Gecko </h3> -<p>Supportée. -</p>
\ No newline at end of file + +La fonction `string` convertit l'argument passé en une chaîne. + +### Syntaxe + + string( [objet] ) + +### Arguments + +- `objet` (optionnel) + - : L'objet à convertir en une chaîne. Si il est omis, le nœud du contexte est utilisé. + +### Retour + +Une chaîne. + +### Notes + +- Si l'objet est un ensemble de nœuds, la valeur de la chaîne du premier nœud de l'ensemble est retournée. +- Un nombre est converti comme suit : + + - NaN est converti en la chaîne `NaN`. + - Zéro positif est converti en `0`. + - Zéro négatif est converti en `0`. + - Infini positif est converti en la chaîne `Infinity`. + - Infini négatif est converti en la chaîne `-Infinity`. + - Les nombres décimaux entre -1 et 1 sont convertis en chaîne comportant un unique 0 avant le séparateur décimale. + +### Définition + +[XPath 1.0, section 4.2](http://www.w3.org/TR/xpath#function-string). + +### Support Gecko + +Supportée. |