endsWith Not working for me.

The argument to endsWith() is a "const String reference". I think it tries to take the argument, in this case a constant 0, and construct a String out of it. In theory the constant should be treated as an 'int' and should thus be converted to a decimal String "0". I think that the constant 0 may be taken as a 'char'. In that case the a two-byte buffer would be constructed with the character (null) and a null terminator. The resulting string would be empty. I suspect that is what is happening and why the "endsWith(0)" always return false.

Perhaps (int)0 would work.