You could process each line by reading it into a buffer e.g. with fscanf. Then use sscanf to pull out each element from your string, e.g.
Code:
char example[] = "| | | | |*| |";
char buf[6][2] = {"", "", "", "", "", ""};
sscanf(example, "|%1[ *]|%1[ *]|%1[ *]|%1[ *]|%1[ *]|%1[ *]|",
buf[0],
buf[1],
buf[2],
buf[3],
buf[4],
buf[5]);
for (int i = 0; i < 6; i++) {
printf("%d: %s\n", i, buf[i]);
}
This assumes that you have at exactly one character in between each | symbol, however. To avoid this requirement, you could process the line using strtok or scan it character by character for the needed information.