summaryrefslogtreecommitdiffstats
path: root/tapset/string.stp
diff options
context:
space:
mode:
Diffstat (limited to 'tapset/string.stp')
-rw-r--r--tapset/string.stp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tapset/string.stp b/tapset/string.stp
index f6933724..64ca8c5f 100644
--- a/tapset/string.stp
+++ b/tapset/string.stp
@@ -16,3 +16,10 @@ function substr:string(str:string,start:long,stop:long) %{
THIS->__retvalue[THIS->stop]='\0';
}
%}
+
+function isinstr:long(s1:string,s2:string) %{
+ if(strstr(THIS->s1,THIS->s2)!=NULL)
+ THIS->__retvalue = 1;
+ else
+ THIS->__retvalue = 0;
+%}