title: Arduino String comparison not working
body: <p>I tried to compare a EEPROM stored SSID that returns a string to the <code>WiFi.SSID()</code> function. </p>
  
  <p>Although it is literally the same in the Serial Monitor I don't get a match and it never reaches the <code>if</code> statement. </p>
  
  <p>I tried using <code>==</code> operator without the <code>.str()</code> and used <code>if( strcmp ( a.c_str(),b.c_str)==1)</code></p>
  
  <p>Nothing seems to work. What am I missing here?</p>
  
  <pre><code>void ConnectToBestWifi()
  {
    int apnos = WiFi.scanNetworks();
    int loc[3];
    int no=0;
    for(int i=0;i&lt;apnos;i++)
    {
      for(int j=0;j&lt;3;j++)
      {
        Serial.println("");
        Serial.println("Wifi SSID");
        Serial.println(WiFi.SSID(i).c_str());
        Serial.println("");
        Serial.println("Read SSID");
        Serial.println(ReadWifiSSID(j).c_str());
        Serial.println("");
  
      if (strcmp(((WiFi.SSID(i)).c_str()),((ReadWifiSSID(j)).c_str()))==1)
      {
        Serial.println("gotcha");
        loc [no]=i;
        no++;        
      }
    }
  </code></pre>
  
  <p>Image of Serial Monitor attached below</p>
  
  <p><img src="https://i.stack.imgur.com/sMizl.png" alt="Serial Monitor"></p>