title: Multiple string manipulation not working
body: <p>I am trying to define multiple strings in a double array such that 
  values[0][]="something", values[1][]="something else...
  I then want to pad the length of each string so that they are 128 characters.
  Finally, I want to split the 128 string into 4-char strings and write them 4 by 4 (so 32 writes). I know I have several problems but can anyone assist? </p>
  
  <p>I found the problem. Here is my code and it does what I want. Thanks to all the suggestions.</p>
  
  <pre><code>for(k=0;k&lt;inputs;k++){//do for all inputs
     flag = 0;
     int len = strlen(values[k]);
     int padded_len = 127;
     int i;
     //pad inputs
     for(i = 0; i &lt; padded_len-len; i++){
                 strcat(values[k], "0");
     }
  
     for (off = 0; off &lt; 128; off += 4){
          strncpy(temp[k], values[k]+off, 4);
          temp[k] = '\0';
  
          temp_int = *((uint32 *) &amp;values[k][off]);
  
          if(flag==0){
          //write to HW regy
          flag=1;
          }
          else{
          //write to HW regx
          flag=0;
          }
      }
  </code></pre>