12 lines
		
	
	
		
			222 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			222 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package common
 | 
						|
 | 
						|
import (
 | 
						|
	"strings"
 | 
						|
)
 | 
						|
 | 
						|
// SafeUsername makes a string lowercase and replaces all spaces with
 | 
						|
// underscores.
 | 
						|
func SafeUsername(s string) string {
 | 
						|
	return strings.Replace(strings.ToLower(s), " ", "_", -1)
 | 
						|
}
 |