一个句子是平线形,如果将所有大写字母转换成小写字母并删除所有非字母字符,读取前后相同.字母字符包括字母和数字.给出一个字符串`s`,返回`true`如果它是平线形,或者'`false`否则.写一个C++函数,解决这个问题.
Here's a sample C++ function to solve the problem:

```
#include <cctype>
#include <string>

bool isPalindrome(std::string s) {
    std::string cleanStr = "";
    // Convert to lowercase and remove non-alphanumeric characters
    for (char c : s) {
        if (std::isalnum(c)) {
            cleanStr += std::tolower(c);
        }
    }
    // Check if palindrome
    int left = 0, right = cleanStr.size() - 1;
    while (left <= right) {
        if (cleanStr[left++] != cleanStr[right--])
            return false;
    }
    return true;
}
```
You can call this function with your string as the input parameter to check if it is a palindrome or not.