title: String manuplation in C
body: <p>I hava a string, say <code>../bin/test.c</code>, so how can i get its substring <code>test</code>?</p>
  
  <p>I tried <code>strtok</code> api, but it seems not good.</p>
  
  <pre><code>  char a[] = "../bin/a.cc";
    char *temp;
    if(strstr(a,"/") != NULL){
      temp = strtok(a, "/");
      while(temp !=NULL){
        temp = strtok(NULL, "/");
      }
  
    }
  </code></pre>