hanayo/vendor/zxq.co/ripple/rippleapi/common/utils.go

12 lines
222 B
Go
Raw Normal View History

2019-02-23 13:29:15 +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)
}