From 953064829b2fed48eda09ed69799b193df6f4aa9 Mon Sep 17 00:00:00 2001 From: kevinrs Date: Thu, 29 Sep 2005 00:10:45 +0000 Subject: mask_string.stp function uses different algorithm to build symbolic flag string from int. Now uses locals to do so. SMP safe. string.stp add isinstr(s1,s2) - return 1 if s1 contains s2 else return 0 --- tapset/string.stp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tapset/string.stp') 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; +%} -- cgit