title: Passing the value of char into string to be used for comparing
body: <p>I am working on a project which will I use Arduino (ATMEGA328) and a GSM (SIM900).</p>
  
  <p>The received messages are stored in a <code>inchar</code>. I was able to print the value of <code>inchar</code> on serial monitor but I want to find a specific word inside the <code>inchar</code>.</p>
  
  <p>Is there any way to pass that char to string so i can use the substring function of string?</p>
  
  <p>Please help. Here's the snippet of my code:</p>
  
  <pre><code>#include &lt;SoftwareSerial.h&gt; 
  #include &lt;string.h&gt;
  
  char inchar; // Will hold the incoming character from the GSM shield
  
  SoftwareSerial SIM900(2, 3);
  //String inchar1;
  
  void setup()
  {
    Serial.begin(9600);
  
    // wake up the GSM shield
    SIM900power(); 
    SIM900.begin(9600);
    delay(20000);
    SIM900.print("AT+CMGF=1\r");
    delay(100);
    SIM900.print("AT+CNMI=2,2,0,0,0\r"); 
    delay(100);
    Serial.println("Ready....");
  }
  
  void SIM900power()
  {
    digitalWrite(9, HIGH);
    delay(1000);
    digitalWrite(9, LOW);
    delay(7000);
  }
  
   void loop() 
  {
  
  if(SIM900.available() &gt;0)
    {
      inchar=SIM900.read();
      Serial.print(inchar);
  
  
  }
  }
  </code></pre>
  
  <p>Here is the output in Serial Monitor:</p>
  
  <pre><code>+CMT: "+1234567890","","15/01/13,10:51:29+32"
  amessage deleted!
  </code></pre>
  
  <p>I want to compare the <code>+1234567890</code> only and discard the others. Is there any way to do that?</p>