Skip to content

Instantly share code, notes, and snippets.

@thongntit
Created July 4, 2018 10:11
Show Gist options
  • Save thongntit/c5518d55ed9a3ea681d7570f92391162 to your computer and use it in GitHub Desktop.
Save thongntit/c5518d55ed9a3ea681d7570f92391162 to your computer and use it in GitHub Desktop.
String Split Applet split string with character
//gcc 5.4.0
#include <stdio.h>
#include <string.h>
int main(void)
{
char str[50]="Hello, world!\n";
char *ptr;
ptr = strtok(str,",");
printf("%s",ptr);
return 0;
}
/* OUTPUT
Hello
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment