endsWith Not working for me.

123tcpip:
"0" doesn't compile
StringStartsWithEndsWith.cpp: In function 'void loop()':
StringStartsWithEndsWith:33: error: invalid conversion from 'const char*' to 'uint8_t'
StringStartsWithEndsWith:33: error: initializing argument 1 of 'int analogRead(uint8_t)'

Compiled and work fine for me in this code:

void setup() {
  Serial.begin(9600);
}

void loop() {
  String sensorReading = "sensor = ";
  sensorReading += analogRead(A0);
  Serial.print (sensorReading);
  if (sensorReading.endsWith("0")) {
    Serial.println(". This reading is divisible by ten"); 
  } 
  else {
    Serial.println(". This reading is not divisible by ten"); 
  }
  delay(250);
}

As I expected sensorReading.endsWith(0) did not work.