Question
split words
Hello i have an Arduino project. I need create an array of words from sentence:
char sText[] = "This is a long text.";
int x = 0;
String arr[5];
//split by space
char *token = strtok(sText, " ");
while (token != NULL) {
arr[x] = token;
x++;
token = strtok(NULL, " ");
}
//new sentence > "This text"
char sNewText[] = arr[0] + " " + arr[4];
How can I do it similar in stm32CubeIde?
