Ds\Deque::join

Joins all values together as a string

説明

public string Ds\Deque::join(string $glue = ?)

Joins all values together as a string using an optional separator between each value.

パラメータ

glue

An optional string to separate each value.

戻り値

All values of the deque joined together as a string.

例1 Ds\Deque::join example using a separator string

<?php
$deque 
= new \Ds\Deque(["a""b""c"123]);

var_dump($deque->join("|"));
?>

上の例の出力は、 たとえば以下のようになります。

string(11) "a|b|c|1|2|3"

例2 Ds\Deque::join example without a separator string

<?php
$deque 
= new \Ds\Deque(["a""b""c"123]);

var_dump($deque->join());
?>

上の例の出力は、 たとえば以下のようになります。

string(11) "abc123"