From a9fc6f73f590bf7f38cc7300d0e9e20d2ff530c6 Mon Sep 17 00:00:00 2001 From: Dmitry Borisenko <49808844+DmitryBorisenko33@users.noreply.github.com> Date: Mon, 31 Aug 2020 02:13:02 +0300 Subject: [PATCH] test --- include/test.h | 3 ++- src/test.cpp | 16 +++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) 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