strrchr

strrchr

[code]

func Strrchr(str, chr string) string {
	if len(str) == 0 || len(chr) == 0 {
		return ""
	}
	if index := strings.LastIndex(str, chr); index != -1 {
		return str[index:]
	}
	return ""
}

eg:
fmt.Println(Strrchr("Golang is the best language in the world", "in"))

[/code]