ripple-api/common/utils.go

12 lines
222 B
Go
Raw Normal View History

2016-10-16 16:27:12 +00:00
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)
}