Debian Codegraph @

vendor/wikimedia/wrappedstring/README.md

raw
1 WrappedString
2 =============
3
4 WrappedString is a small PHP library for compacting redundant string-wrapping
5 code in text output. The most common use-case is to eliminate redundant runs of
6 HTML open/close tags and JavaScript boilerplate.
7
8 Here is how you use it:
9
10 ```php
11 use Wikimedia\WrappedString;
12
13 $buffer = [
14 new WrappedString( '[foo]', '[', ']' ),
15 new WrappedString( '[bar]', '[', ']' ),
16 ];
17 $output = WrappedString::join( "\n", $buffer );
18 // Result: '[foobar]'
19 ```
20
21 License
22 -------
23
24 The project is licensed under the MIT license.