[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: comparing sequences that contain more than one of
contains(str1, str2) ? On Fri, 2008-02-22 at 13:57 +0000, Andrew Welch wrote: > A bit of a Friday challenge... > > Is it possible to compare to sequences such that items in the sequence > are consumed after the comparison? > > For example, I want to compare two words to see if one is a subset of the other. > > "farmer" and "frame" > > If you do: > > string-to-codepoints('farmer')[not(. = string-to-codepoints('frame'))] > > the result is empty because the two r's in farmer are both being > compared to the single r in frame. > > Currently I've a got a recursive function that removes each letter > after a match, but I'm wondering if there's a one-liner or some other > set based approach? > > > thanks
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|