truncating a long title and wrapping to a new line
Posted on 2011-10-25
I have some text that I need to format that is fed from a db.
This text might be nicely structured with spaces or lots of characters connected e.g.:
What I'm looking to do is apply some editing if a series of connected characters are detected without spacing.
So something like:
- If character length of string (which doesn't have any spaces) exceeds char limit, then add a <br /> so it wraps to a new line.