photoprism/pkg/txt/slug.go

13 lines
189 B
Go
Raw Normal View History

package txt
import "strings"
// SlugToTitle converts a slug back to a title
func SlugToTitle(s string) string {
if s == "" {
return ""
}
return Title(strings.Join(Words(s), " "))
}