Skip to content
/ surlf Public

URL formatting in the style of printf strings

License

Notifications You must be signed in to change notification settings

jmsfwk/surlf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

surlf

Build Status

Usage

use Jmsfwk\Surlf\Formatter;

echo Formatter::format('%h/%p', 'http://example.com/a-path');
// example.com/a-path

Formats

The examples in the table below are based on the url http://example.com/a/b/c?d=e&f=g.

Format character Description Example
s URL scheme http
h Host example.com
p Path a/b/c
q Query d=e&f=g
% Literal % character %

About

URL formatting in the style of printf strings

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages