mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
optimization
This commit is contained in:
17
src/main.cpp
17
src/main.cpp
@@ -86,6 +86,23 @@ void setup() {
|
||||
|
||||
just_load = false;
|
||||
initialized = true;
|
||||
|
||||
String buf = "Geeks-for-Geeks";
|
||||
int buf_len = buf.length() + 1;
|
||||
char char_array[buf_len];
|
||||
buf.toCharArray(char_array, buf_len);
|
||||
char* token = strtok(char_array, "-");
|
||||
while (token != NULL) {
|
||||
printf("%s\n", token);
|
||||
token = strtok(NULL, "-");
|
||||
}
|
||||
|
||||
//char str[] = "Geeks for Geeks";
|
||||
//char* token;
|
||||
//char* rest = str;
|
||||
//while ((token = strtok_r(rest, " ", &rest))) {
|
||||
// printf("%s\n", token);
|
||||
//}
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
Reference in New Issue
Block a user