From ae4f499db105e3a983e16719318a1c130176afdb Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Mon, 16 Sep 2024 18:34:28 +0800 Subject: [PATCH] update --- .gitignore | 3 +++ src/replaceStr/main.cpp | 47 +++++++++++++++++++++++++++++++++++++++++ xmake.lua | 9 ++++++++ 3 files changed, 59 insertions(+) create mode 100644 .gitignore create mode 100644 src/replaceStr/main.cpp create mode 100644 xmake.lua diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d3620c2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.vscode +.xmake +build \ No newline at end of file diff --git a/src/replaceStr/main.cpp b/src/replaceStr/main.cpp new file mode 100644 index 0000000..cd001da --- /dev/null +++ b/src/replaceStr/main.cpp @@ -0,0 +1,47 @@ +#include +#include + +template +void print(const Args&...args){ + std::stringstream ss; + ((ss< +class Range{ +private: + T _start,_end,_step; +public: + Range(const T start,const T end){Range(start,end,1);} + Range(const T start,const T end,const T step):_start(start),_end(end),_step(step){} + + struct Iterator{ + T current; + T step; + Iterator()=delete; + Iterator(const T start)noexcept{Iterator(start,1);} + Iterator(const T start,const T step)noexcept:current(start),step(step){} + bool operator!=(const Iterator &other)const noexcept{ + return current