Guest User

Untitled

a guest
Oct 14th, 2019
105
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int main(void)
  2. {
  3. char *str_buffer = NULL;
  4. char **strs = NULL;
  5. size_t count=0;
  6.  
  7. str_buffer = strdup("Try: A string to split.");
  8. assert(str_buffer);
  9.  
  10. strs = split2(str_buffer, &count);
  11. for (int i=0; i<count; i++) {
  12. printf("%d: %s\n", i, strs[i]);
  13. }
  14. free(str_buffer);
  15. return 0;
  16. }
RAW Paste Data