Download the PHP package fuitad/string-sequencer without Composer
On this page you can find all versions of the php package fuitad/string-sequencer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download fuitad/string-sequencer
More information about fuitad/string-sequencer
Files in fuitad/string-sequencer
Download fuitad/string-sequencer
More information about fuitad/string-sequencer
Files in fuitad/string-sequencer
Vendor fuitad
Package string-sequencer
Short Description PHP package that allows you to parse strings as sequences
License MIT
Package string-sequencer
Short Description PHP package that allows you to parse strings as sequences
License MIT
Keywords string sequence sequencer
Please rate this library. Is it a good library?
Informations about the package string-sequencer
StringSequencer
==============
PHP package that allows you to parse strings as sequences.
Installation
Require this package with Composer
Usage
Import the class in your PHP file
static from() method:
Will return.
array:5 [
0 => "http://www.google.com/page1.html"
1 => "http://www.google.com/page2.html"
2 => "http://www.google.com/page3.html"
3 => "http://www.google.com/page4.html"
4 => "http://www.google.com/page5.html"
]
static multi() method:
Will return.
array:25 [
0 => "http://www.google.com/page1-20.html"
1 => "http://www.google.com/page1-25.html"
2 => "http://www.google.com/page1-30.html"
3 => "http://www.google.com/page1-35.html"
4 => "http://www.google.com/page1-40.html"
5 => "http://www.google.com/page2-20.html"
6 => "http://www.google.com/page2-25.html"
7 => "http://www.google.com/page2-30.html"
8 => "http://www.google.com/page2-35.html"
9 => "http://www.google.com/page2-40.html"
10 => "http://www.google.com/page3-20.html"
11 => "http://www.google.com/page3-25.html"
12 => "http://www.google.com/page3-30.html"
13 => "http://www.google.com/page3-35.html"
14 => "http://www.google.com/page3-40.html"
15 => "http://www.google.com/page4-20.html"
16 => "http://www.google.com/page4-25.html"
17 => "http://www.google.com/page4-30.html"
18 => "http://www.google.com/page4-35.html"
19 => "http://www.google.com/page4-40.html"
20 => "http://www.google.com/page5-20.html"
21 => "http://www.google.com/page5-25.html"
22 => "http://www.google.com/page5-30.html"
23 => "http://www.google.com/page5-35.html"
24 => "http://www.google.com/page5-40.html"
]
Formatting
You can also add a sprintf compatible pattern to format the output.
Will return
array:5 [
0 => "http://www.google.com/page01.html"
1 => "http://www.google.com/page02.html"
2 => "http://www.google.com/page03.html"
3 => "http://www.google.com/page04.html"
4 => "http://www.google.com/page05.html"
]
Back Reference
If you need to have the same iteration done multiple times in a string (versus having different iterations performed on a string), you can use back references. Keep in mind that while the syntax kinda looks like regular expression back references, it is not.
Will return.
array:5 [
0 => "http://www.google.com/page1/1.html"
1 => "http://www.google.com/page2/2.html"
2 => "http://www.google.com/page3/3.html"
3 => "http://www.google.com/page4/4.html"
4 => "http://www.google.com/page5/5.html"
]
All versions of string-sequencer with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.4.0
The package fuitad/string-sequencer contains the following files
Loading the files please wait ....