-
Notifications
You must be signed in to change notification settings - Fork 167
Expand file tree
/
Copy pathstring.xml
More file actions
45 lines (42 loc) · 1.32 KB
/
string.xml
File metadata and controls
45 lines (42 loc) · 1.32 KB
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
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 16934048f79c6e117cd16a23c09c1b2ea502e284 Maintainer: yannick Status: ready -->
<!-- Reviewed: no -->
<sect1 xml:id="language.operators.string">
<title>Opérateurs de chaînes de caractères</title>
<titleabbrev>Chaînes de caractères</titleabbrev>
<simpara>
Il y a deux opérateurs de chaînes de caractères <type>string</type>.
Le premier est l'opérateur de concaténation ('.'), qui
retourne la concaténation de ses deux arguments.
Le second est l'opérateur d'affectation
concaténant (<literal>.=</literal>). Voir
<link linkend="language.operators.assignment">opérateurs d'affectation</link>
pour plus de détails.
</simpara>
<para>
<example>
<title>Concaténation de chaînes</title>
<programlisting role="php">
<![CDATA[
<?php
$a = "Hello ";
$b = $a . "World!"; // $b contient désormais "Hello World!"
var_dump($b);
$a = "Hello ";
$a .= "World!"; // $a contient désormais "Hello World!"
var_dump($a);
?>
]]>
</programlisting>
</example>
</para>
<sect2 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><link linkend="language.types.string">Le type string</link></member>
<member><link linkend="ref.strings">Les fonctions de chaînes de caractères</link></member>
</simplelist>
</para>
</sect2>
</sect1>