aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/xpath/functions/substring-before/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/fr/web/xpath/functions/substring-before/index.html')
-rw-r--r--files/fr/web/xpath/functions/substring-before/index.html38
1 files changed, 38 insertions, 0 deletions
diff --git a/files/fr/web/xpath/functions/substring-before/index.html b/files/fr/web/xpath/functions/substring-before/index.html
new file mode 100644
index 0000000000..5542b2c0cb
--- /dev/null
+++ b/files/fr/web/xpath/functions/substring-before/index.html
@@ -0,0 +1,38 @@
+---
+title: substring-before
+slug: Web/XPath/Fonctions/substring-before
+tags:
+ - Référence_XSLT
+translation_of: Web/XPath/Functions/substring-before
+---
+<p>
+{{ XsltRef() }}
+</p><p><br>
+La fonction <code>substring-before()</code> retourne retourne la partie d'une chaîne donnée précédant une sous-chaîne donnée.
+</p>
+<h3 id="Syntaxe" name="Syntaxe"> Syntaxe </h3>
+<pre class="eval">substring-before( <i>bottedefoin</i> , <i>aiguille</i> )
+</pre>
+<h3 id="Arguments" name="Arguments"> Arguments </h3>
+<dl><dt><code><i>bottedefoin</i></code>
+</dt><dd>La chaîne à évaluer. Un extrait de cette chaîne sera retourné.
+</dd></dl>
+<dl><dt><code><i>aiguille</i></code>
+</dt><dd>La sous-chaîne à rechercher. Tout le contenu se trouvant avant la première occurrence de <code><i>aiguille</i></code> dans la chaîne <code><i>bottedefoin</i></code> sera retourné.
+</dd></dl>
+<h3 id="Retour" name="Retour"> Retour </h3>
+<p>Une chaîne.
+</p>
+<h3 id="Exemples" name="Exemples"> Exemples </h3>
+<table class="standard-table"> <tbody><tr> <th>XPath Example</th> <th>Output</th> </tr> <tr> <td><code>&lt;xsl:value-of select="substring-before('1999/04/01','/')" /&gt;</code></td> <td><code>1999</code></td> </tr> <tr> <td><code>substring-before('aa-bb','-')</code></td> <td><code>aa</code></td> </tr> <tr> <td><code>substring-before('aa-bb','a')</code></td> <td><code>(empty string)</code></td> </tr> <tr> <td><code>substring-before('aa-bb','b')</code></td> <td><code>aa-</code></td> </tr> <tr> <td><code>substring-before('aa-bb','q')</code></td> <td>(empty string)</td> </tr>
+</tbody></table>
+<h3 id="D.C3.A9finition" name="D.C3.A9finition"> Définition </h3>
+<p><a href="http://www.w3.org/TR/xpath#function-substring-before" class="external">XPath 1.0, section 4.2</a>.
+</p>
+<h3 id="Support_Gecko" name="Support_Gecko"> Support Gecko </h3>
+<p>Supportée.
+</p><p><span class="comment">Interwiki Languages Links</span>
+</p>
+<div class="noinclude">
+</div>
+{{ languages( { "en": "en/XPath/Functions/substring-before", "ja": "ja/XPath/Functions/substring-before", "pl": "pl/XPath/Funkcje/substring-before" } ) }}