hanayo/vendor/zxq.co/ripple/rippleapi/common/utils.go
2019-02-23 13:29:15 +00:00

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)
}