aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/exslt/str/split/index.md
blob: 26f6ff103331324a773035d7ec564de41224cfe1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
title: split
slug: Web/EXSLT/str/split
tags:
  - EXSLT
  - XSLT
translation_of: Web/EXSLT/str/split
---
{{ XsltRef() }}

`str:split()` divise une chaîne en utilisation un motif pour déterminer où doivent être fait les séparations, en retournant un ensemble de nœuds contenant les chaînes résultantes.

### Syntaxe

    str:split(chaîne,motif)

### Arguments

- `chaîne`
  - : La chaîne à diviser.
- `motif`
  - : Le motif indiquant les endroits de division de la chaîne.

### Retourne

Un ensemble de nœuds d'éléments `token`, contenant chacun un `token` provenant de `chaîne`.

Par exemple :

    str:split('livre, téléphone, ordinateur, chaise', ', ')

Retourne l'ensemble de nœuds suivant :

    <token>livre</token>
    <token>téléphone</token>
    <token>ordinateur</token>
    <token>chaise</token>

### Définition

- [EXSLT - STR:SPLIT (en)](http://www.exslt.org/regexp/functions/split/index.html)

### Support par Gecko

Supporté par Gecko 1.9 et ultérieur.