whole(string) is in a fld

Dave Cragg dcragg at lacscentre.co.uk
Tue Jun 12 15:12:19 CDT 2007


This doesn't check that the matched target starts on a word boundary,  
But a simple check on char (tOff -1) or whether tOff is at the  
beginning of the target shoud do it.


On 12 Jun 2007, at 20:32, Dave Cragg wrote:

> Please ignore my first attempt. It fails horribly. (-:
>
> Here's another. Any better?
>
> function whole s,t
>   put length(s) into tNumChars
>   put ",.;:?!" & space & tab & cr & numToChar(13) into tWB
>   put offset(s,t) into tOff
>   if tOff = 0 then return false
>   return length(t) = (tOff + tNumChars - 1) OR char (tOff +  
> tNumChars) of t is in tWB
>
> end whole
>
> Dave
>
>
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard



More information about the metacard mailing list