[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Algorithm for splitting a string at a space

Subject: Algorithm for splitting a string at a space
From: "Rick Quatro rick@xxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 23 Nov 2015 19:04:22 -0000
 Algorithm for splitting a string at a space
Hello,

I have a series of strings that I need to split if they are longer than a
particular length, say 30 characters. But I need to make the split at the
previous space. Here is an example string:

This is a long line that I want to split at a space.

The 30th character is in the middle of a word, so I need to do the split at
the previous space. I am using XSLT/XPath 2.0. I am having trouble
developing a good algorithm for this. Any pointers would be appreciated.

Rick

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.