Question: Currently, I'm using the following Command & Target within Selenium IDE to verify the exact text of a meta description

```
 verifyelementpresent :    //meta[@name='description' and @content='description here']

```

I would like to check if the meta description is between 145 and 165 characters to see if it exists. that way when the description changes, the test will only fail if the description is under 145 lines or over 165(which a meta description cant be anyway)

can anyone assist me in writing this expression? assuming some sort of variable is necessary under content to check length of..

Answer: 
`operator==` for `const char*` does not do a string comparison, it directly compares the pointers. The buffer used by `xx` is not the same as the `same` pointer, so they are not equal.

To do string comparison with a `std::string` and a `const char*` you can just use the operator provided by `std::string`:

```
if (xx == same)
{
    cout << "equal" << endl;
}

```
You are comparing the values of two pointers, which can **never** be equal. `same` points to read-only memory, and the pointer returned by `c_str` is the current data buffer of the `std::string` object with a null terminator guaranteed to be appended.

You *could* write `xx == same`: this is because `std::string` overloads `==` with the appropriate data types. Alternatively, and perhaps less elegantly, you could use `std::strcmp` on the two pointers.