Check out example codes for "striing.split funtion in cpp". It will help you in understanding the concepts better.

Code Example 1

char str[] = "Geeks-for-Geeks"; 
  
    // Returns first token  
    char *token = strtok(str, "-"); 
    
    // Keep printing tokens while one of the 
    // delimiters present in str[]. 
    while (token != NULL) 
    { 
        printf("%s\n", token); 
        token = strtok(NULL, "-"); 
    }

Learn ReactJs, React Native from akashmittal.com