public boolean isPalindrome(String s) {
        s = s.trim().toLowerCase();
        if (s.length() == 0)
            return true;
        int l = 0, r = s.length() - 1;
        while (l <= r) {
            while (l < r && !isAlpha(s.charAt(l))) {
                l++;
            }
            while (r > l && !isAlpha(s.charAt(r))) {
                r--;
            }
            if (s.charAt(l) != s.charAt(r))
                return false;
            l++;
            r--;
        }
        return true;
    }