split serial.readString() output I'm trying to read a string like this one:

2;12;42;43;34


over a serial connection and split this string afterwards by a ";".
So the output would be this array:

(2,12,42,34)


All the stuff runs on an arduino uno. So I made some code:

String read_input;
char read_input_char[20];
char *read_values;

void setup() {

  Serial.begin(9600);
  Serial.setTimeout(10);

}

void loop() {
  if(Serial.available()){
    read_input = Serial.readString();
    read_input.toCharArray(read_input_char, 20);

    read_values = strtok(read_input_char, ";");
    Serial.println(read_values[2]);
  }
}


However now instead of outputting the 3rd array element it outputs only an '1'. What's wrong?
This is a C question, not an arduino question, but anyway:

From the man page:

DESCRIPTION
   The  strtok()  function  breaks a string into a sequence of zero or more nonempty tokens.  On the first call to strtok() the
   string to be parsed should be specified in str.  In each subsequent call that should parse the  same  string,  str  must  be
   NULL.


You are only calling strtok() once, so it only parses the first value. You need to keep calling it until there is nothing left to parse.