title: Parse string into array based on spaces or "double quotes strings"
body: <p>Im trying to take a user input string and parse is into an array called char *entire_line[100]; where each word is put at a different index of the array but if a part of the string is encapsulated by a quote, that should be put in a single index.
  So if I have</p>
  
  <pre><code>char buffer[1024]={0,};
  fgets(buffer, 1024, stdin);
  </code></pre>
  
  <p>example input: "word filename.txt "this is a string that shoudl take up one index in an output array";</p>
  
  <pre><code>tokenizer=strtok(buffer," ");//break up by spaces
          do{
              if(strchr(tokenizer,'"')){//check is a word starts with a "
              is_string=YES;
              entire_line[i]=tokenizer;// if so, put that word into current index
              tokenizer=strtok(NULL,"\""); //should get rest of string until end "
              strcat(entire_line[i],tokenizer); //append the two together, ill take care of the missing space once i figure out this issue
  
                }  
          entire_line[i]=tokenizer;
          i++;
          }while((tokenizer=strtok(NULL," \n"))!=NULL);
  </code></pre>
  
  <p>This clearly isn't working and only gets close if the double quote encapsulated string is at the end of the input string
  but i could have 
  input: word "this is text that will be user entered" filename.txt
  Been trying to figure this out for a while, always get stuck somewhere.
  thanks</p>