user18466: I am doing a motorcycle security system. In this system, I will receive a message from GSM in the form {password:operation (like start,stop,alarm):time}.
Example:(9990:start:30)
now i need to split  each term seperately (a=9990,b=start,c=30).help me to solve

user13432: Simplest solution is to use sscanf().
  int password;
  char operation;
  int time;
  char* buf = "{14:C:123}";
  int n = sscanf(buf, "{%d:%c:%d}", &password, &operation, &time);
  Serial.print(F("n="));
  Serial.println(n);
  Serial.print(F("password="));
  Serial.println(password);
  Serial.print(F("operation="));
  Serial.println(operation);
  Serial.print(F("time="));
  Serial.println(time);


18466: <p>I am doing a motorcycle security system. In this system, I will receive a message from GSM in the form <code>{password:operation (like start,stop,alarm):time}</code>.
Example:(9990:start:30)</p>

<p>now i need to split  each term seperately (a=9990,b=start,c=30).help me to solve</p>
 13432: <p>Simplest solution is to use <a href="http://www.cplusplus.com/reference/cstdio/scanf/" rel="nofollow">sscanf()</a>.</p>

<pre><code>  int password;
  char operation;
  int time;
  char* buf = "{14:C:123}";
  int n = sscanf(buf, "{%d:%c:%d}", &amp;password, &amp;operation, &amp;time);
  Serial.print(F("n="));
  Serial.println(n);
  Serial.print(F("password="));
  Serial.println(password);
  Serial.print(F("operation="));
  Serial.println(operation);
  Serial.print(F("time="));
  Serial.println(time);
</code></pre>
