package main
import (
"fmt"
"strings"
)
func isPalindrome(s string) bool {
s = strings.ToLower(s)
length := len(s)
// Check each character from the start and end
for i := 0; i < length/2; i++ {
if s[i] != s[length-i-1] {
return false
}
}
return true
}
func main() {
s := "abcba"
fmt.Println(isPalindrome(s))
}
/*
run:
true
*/