Limit the amount of characters in xsl select string

Okay, a nice simple one that I found today, might be useful. If you ever have to display content on your site and need to limit the amount of characters in it, such as a summary, then you can use something like the following to display what you need. This also adds '...' after the final characters.

Great if you are not in control of the data source such as twitter feeds.

 
<xsl:value-of select="concat(substring(text, 1, 100), '...')" />