]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blob - vendor/wikimedia/wrappedstring/README.md
MediaWiki 1.30.2
[autoinstalls/mediawiki.git] / vendor / wikimedia / wrappedstring / README.md
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 <pre lang="php">
11 use WrappedString\WrappedString;
12
13 $buffer = array(
14         new WrappedString( '[foo]', '[', ']' ),
15         new WrappedString( '[bar]', '[', ']' ),
16 );
17 $output = WrappedString::join( "\n", $buffer );
18 // Result: '[foobar]'
19 </pre>
20
21 License
22 -------
23
24 The project is licensed under the MIT license.