diff --git a/include/test.h b/include/test.h index 4383e14d..6de4739a 100644 --- a/include/test.h +++ b/include/test.h @@ -1,4 +1,5 @@ #pragma once void setupTest(); -void loopTest(); \ No newline at end of file +void loopTest(); +//char stringToCharArray(String in); \ No newline at end of file diff --git a/src/test.cpp b/src/test.cpp index 57c88450..e810dec3 100644 --- a/src/test.cpp +++ b/src/test.cpp @@ -1,15 +1,14 @@ -#include "Global.h" #include "test.h" +#include "Global.h" + void setupTest() { //пример выделения подстрок 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, "-"); @@ -24,5 +23,12 @@ void setupTest() { } void loopTest() { - -} \ No newline at end of file +} + +//char stringToCharArray(int& i, String in) { +// int in_len = in.length() + 1; +// i = in_len; +// char char_array[in_len]; +// in.toCharArray(char_array, in_len); +// return char_array[in_len]; +//} \ No newline at end of file