package main
import (
"fmt"
"strings"
)
func main() {
fmt.Println(IsPalindrome("aba"))
fmt.Println(IsPalindrome("Abba"))
fmt.Println(IsPalindrome("a"))
fmt.Println(IsPalindrome("hello"))
}
func IsPalindrome(str string) bool {
newStr := []rune(str)
var tempStr []rune
for i := len(newStr) - 1; i >= 0; i-- {
tempStr = append(tempStr, newStr[i])
}
newStrConv := strings.ToLower(string(newStr))
reversStr := strings.ToLower(string(tempStr))
if newStrConv == reversStr {
return true
}
return false
}