|
static | join ( $sep, array $lists) |
| Join a several wrapped strings with a separator between each.
|
|
|
static | compact (array $lists, $outerSep) |
| Merge consecutive lists with the same separator.
|
|
◆ __construct()
Wikimedia\WrappedStringList::__construct |
( |
| $sep, |
|
|
array | $wraps ) |
- Parameters
-
string | $sep | |
| (string|WrappedString|WrappedStringList)[] | $wraps |
◆ __toString()
Wikimedia\WrappedStringList::__toString |
( |
| ) |
|
◆ compact()
static Wikimedia\WrappedStringList::compact |
( |
array | $lists, |
|
|
| $outerSep ) |
|
staticprotected |
Merge consecutive lists with the same separator.
Does not modify the given array or any of the objects in it.
- Parameters
-
| (string|WrappedString|WrappedStringList)[] | $lists |
string | $outerSep | Separator that the caller intends to use when joining the strings |
- Returns
- string[] Compacted list to be treated as strings (may contain WrappedString and WrappedStringList objects)
◆ join()
static Wikimedia\WrappedStringList::join |
( |
| $sep, |
|
|
array | $lists ) |
|
static |
Join a several wrapped strings with a separator between each.
- Parameters
-
string | $sep | |
| (string|WrappedString|WrappedStringList)[] | $lists |
- Returns
- string
The documentation for this class was generated from the following file: