ref: 587c48547434b3cc2019052bf8b7c2c5c91d5d05
parent: 77250bd10ad299cd1c4eec7ea1bf8b7a2edfc491
author: MHS <gek@katherine>
date: Fri Apr 23 21:46:25 EDT 2021
Automatic commit.
--- a/include-demo/stringutil.h
+++ b/include-demo/stringutil.h
@@ -98,9 +98,8 @@
si++;
if(subtext[si] == '\0') return (ti - st)+1;
}else {
- si = 0;
- if(text[ti] == subtext[si])si++; /*Minor case.*/
- if(subtext[si] == '\0') return (ti - st);
+ if(subtext[si] == '\0') return (ti - st)+1;
+ ti-=si;si = 0;
}
}
return -1;