From 25bd26972945f956ad4c92ce8a61bb6126c0dedb Mon Sep 17 00:00:00 2001 From: Leonetienne Date: Sun, 13 Mar 2022 15:52:53 +0100 Subject: Implementation Split --- Exec/CMakeLists.txt | 10 +++++++--- Exec/main.cpp | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'Exec') diff --git a/Exec/CMakeLists.txt b/Exec/CMakeLists.txt index d42e35f..c51da8b 100644 --- a/Exec/CMakeLists.txt +++ b/Exec/CMakeLists.txt @@ -4,7 +4,11 @@ project(Exec) set(CMAKE_CXX_STANDARD 17) include_directories(../Src) -link_directories(../Src/cmake-build-debug) -add_executable(Exec main.cpp) -target_link_libraries(Exec StringTools) +FILE(GLOB StringTools ../Src/*.cpp) + +add_executable(Exec + ${StringTools} + + main.cpp +) diff --git a/Exec/main.cpp b/Exec/main.cpp index b833214..bb337a5 100644 --- a/Exec/main.cpp +++ b/Exec/main.cpp @@ -3,7 +3,11 @@ int main() { - std::cout << StringTools::Replace("Hello, ${where}!\n", "${where}", "World") << std::endl; + std::vector foo = + StringTools::Split("Hello, lol, test", ", "); + + for (const auto& it : foo) + std::cout << "'" << it << "'" << std::endl; return 0; } -- cgit v1.2.3