Replace delimiters with '\0'
strcpy separators before processing them
Use delim length not \0