[pmwiki-users] MarkupExpressions

Patrick R. Michaud pmichaud at pobox.com
Sun May 27 09:38:55 CDT 2007


Scott Connard writes:
> I've been doing some work with parameters to include files (an  
> excellent feature) and I'm wondering if you might consider adding a  
> markup expression for strpos() or some variant of it so that we can  
> see if a string occurs in a parameter string.  
>
> My needs are simply to evaluate if a string can be found in the 
> source string and not specifically what position it starts in, 
> but you could implement it either way.

Does it need to be a markup expression or a conditional markup?

    (:if strpos <haystack> <needle>:)

    {(strpos <haystack> <needle>)}


If the latter, what do you want strpos() to return to indicate
true (needle is in haystack) or false (needle is not in haystack)?

Pm



More information about the pmwiki-users mailing list