This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: counting the number of tokens in a string?


john liao wrote:

another newbie question. Is there an easy way to count
the number of commas in a string? Like this:

<ITEM cols="col1,col2,col3,col4"/>
What about
string-length($str) - string-length(translate($str,',',''))

--
Oleg Tkachenko
Multiconn International, Israel


XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]