Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - [xsl] Counting occurences of a character in a string [Thread Next] Re: [xsl] Counting occurences of a character in a stringTo: Date: 4/1/2008 10:57:00 PM David Carlisle wrote: >count(tokenize($s,'X'))-1 Ahh - and that is a use case for the zero-length elements (tokens) generated when the separator pattern is matched directly at the start or end of a string. I was wondering about that behaviour, and it was actually my first pitfall in my initial attempt at a solution. Thanks to all who responded so quickly! I'll make an xsl:function and pick one of the implementations. Since that function will not be called often, I guess I will not see a measurable (or better: relevant) performance difference. Christian | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
