From 572caa74ed824fefa02eb81adc7639a783f243c7 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sun, 10 Aug 2025 19:03:46 +0200 Subject: working on invoice form --- src/strops.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/strops.cpp') diff --git a/src/strops.cpp b/src/strops.cpp index 42042cb..116eec4 100644 --- a/src/strops.cpp +++ b/src/strops.cpp @@ -1,4 +1,5 @@ #include +#include #include "strops.hpp" @@ -15,4 +16,20 @@ size_t strops_copy(char *dst, const char *src, size_t size) dst[srclen] = '\0'; return (srclen); +} + +char* strops_stristr(char* haystack, char* needle) +{ + do { + const char* h = haystack; + const char* n = needle; + while (tolower((unsigned char) *h) == tolower((unsigned char ) *n) && *n) { + h++; + n++; + } + if (*n == 0) { + return (char *) haystack; + } + } while (*haystack++); + return 0; } \ No newline at end of file -- cgit v1.2.3-70-g09d2