summaryrefslogtreecommitdiff
path: root/vendor/wikimedia/wrappedstring/README.md
blob: 5c8b8fb016c48d3d17b90dbd8ba069d0cd30b96f (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
WrappedString
=============

WrappedString is a small PHP library for compacting redundant string-wrapping
code in text output. The most common use-case is to eliminate redundant runs of
HTML open/close tags and JavaScript boilerplate.

Here is how you use it:

<pre lang="php">
use WrappedString\WrappedString;

$buffer = array(
	new WrappedString( '[foo]', '[', ']' ),
	new WrappedString( '[bar]', '[', ']' ),
);
$output = WrappedString::join( "\n", $buffer );
// Result: '[foobar]'
</pre>

License
-------

The project is licensed under the MIT license.