admin Messages 1,679 Reaction score 288 Website tehadm.ru Oct 2, 2024 #1 C-like: package main import ( "fmt" "strings" ) func main() { fmt.Println(solution("abc", "c")) fmt.Println(solution("abc", "abc")) } func solution(str, ending string) bool { return strings.HasSuffix(str, ending) }
C-like: package main import ( "fmt" "strings" ) func main() { fmt.Println(solution("abc", "c")) fmt.Println(solution("abc", "abc")) } func solution(str, ending string) bool { return strings.HasSuffix(str, ending) }