summaryrefslogtreecommitdiff
path: root/src/luma/app_t/strcut.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/luma/app_t/strcut.cc')
-rw-r--r--src/luma/app_t/strcut.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/luma/app_t/strcut.cc b/src/luma/app_t/strcut.cc
new file mode 100644
index 0000000..233c47f
--- /dev/null
+++ b/src/luma/app_t/strcut.cc
@@ -0,0 +1,25 @@
+# include <luma/main.hh>
+char const * luma::app_t::strcut(char const * str,int pos,int len) {
+ /*
+ if((this->strlen(str) - pos - len - 0x1) < 0x0) { // 0x1 counts null as well
+ // string too short
+ this->msgerr("String too short!\n");
+ return nullptr;
+ }
+ else {
+ char * outstr = nullptr;
+ int outstrpos = 0x0;
+ this->msg("boys");
+ for(int pos = 0x0;(pos < len);++pos) {
+ this->msg("diers");
+ char chr = str[pos];
+ this->msg("hallo");
+ outstr[outstrpos] = chr;
+ ++outstrpos;
+ }
+ outstr[++outstrpos] = '\0';
+ return outstr;
+ }
+ */
+ return nullptr;
+}