1cbb0a6d56
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
13 lines
190 B
Go
13 lines
190 B
Go
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), " "))
|
|
}
|
|
|