kevinlebrun / slug.php Goto Github PK
View Code? Open in Web Editor NEWGenerate slug from string
License: MIT License
Generate slug from string
License: MIT License
Hello.
Can you tag v1.0.0 your library ? (for composer and don't have to require a dev version).
Thanks.
Hi,
Just to let you know, we are making a proposal for the creation of a standard slugifier/urlizer interface at fig-standards:
https://github.com/php-fig/fig-standards/pull/100
There is also a mailing list post:
https://groups.google.com/forum/?fromgroups=#!topic/php-fig/J-6s9Wlyk-A
It would be cool if this PSR goes through and we can apply it to this library :)
Cheers
Dan
Don't waste time with substr if it's not needed.
$string = mb_substr($string, 0, ($this->limit ? $this->limit : mb_strlen($string, 'UTF-8')), 'UTF-8');
Change to this:
if($this->limit) {
$string = mb_substr($string, 0, $this->limit, 'UTF-8');
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.