library slugger
        Creates URL Slugs from Strings
    
            
                
                    
                    
                    
                    
                        
                            
    
        
        
            geosocio/slugger
            Creates URL Slugs from Strings
         
     
    
        
            -  Friday, January 26, 2018
-  by davidbarratt
-  Repository
-  1 Watchers
-  1 Stars
-  71 Installations
 
    
        
                            - PHP
-  1 Dependents
-  0 Suggesters
-  1 Forks
-  0 Open issues
-  5 Versions
-  1 % Grown
 
 
    
        
            
    
    
    
Slugger  
  
Create URL Slugs From UTF-8 Strings, (*1)
Rules
- Trim Whitespace
- Lowercase (if possible)
- Replace (space) with -(dash)
- Remove .,(, and)
- Remove any duplicate -(dashes)
- Trim any -(dashes) from the beginning or end
Example
$slugger = new \GeoSocio\Slugger\Slugger();
echo $slugger->slug('St. Petersburg');
// st-petersburg
See more examples in tests/SluggerTest.php, (*2)
         
     
 
    
        
            
                                    
                        
                        
                        
                            dev-develop
                            dev-develop
                                                        
                                Creates URL Slugs from Strings
                                
                                                                     
                                    Sources
                                                                                                     
                                    Download
                                                                
                                
                                                                            LGPL-3
                                                                            LGPL-3.0-or-later
                                    
                                
                                                                                                    The Development Requires
                                    
                                                            
                            
                                
                            
                            
                                
                            
                         
                     
                                    
                        
                        
                        
                            1.1.2
                            1.1.2.0
                                                        
                                Creates URL Slugs from Strings
                                
                                                                     
                                    Sources
                                                                                                     
                                    Download
                                                                
                                
                                                                            LGPL-3.0-or-later
                                    
                                
                                                                                                    The Development Requires
                                    
                                                            
                            
                                
                            
                            
                                
                            
                         
                     
                                    
                        
                        
                        
                            1.1.1
                            1.1.1.0
                                                        
                                Creates URL Slugs from Strings
                                
                                                                     
                                    Sources
                                                                                                     
                                    Download
                                                                
                                
                                                                            LGPL-3.0
                                    
                                
                                                                                                    The Development Requires
                                    
                                                            
                            
                                
                            
                            
                                
                            
                         
                     
                                    
                        
                        
                        
                            1.1.0
                            1.1.0.0
                                                        
                                Creates URL Slugs from Strings
                                
                                                                     
                                    Sources
                                                                                                     
                                    Download
                                                                
                                
                                                                            LGPL-3
                                    
                                
                                                                                                    The Development Requires
                                    
                                                            
                            
                                
                            
                            
                                
                            
                         
                     
                                    
                        
                        
                        
                            1.0.0
                            1.0.0.0
                                                        
                                Creates URL Slugs from Strings
                                
                                                                     
                                    Sources
                                                                                                     
                                    Download
                                                                
                                
                                                                            LGPL-3
                                    
                                
                                                                                                    The Development Requires