[jQuery] [S] Truncate textstring / result plaintext string
Hi,
i was looking how to truncate a simple textstring (no tags), ie. "This
string is too long" to "This string" with a simple call var newString
= $(xyz).truncate(minlength, maxlength, atlength, array(".", ",", "-",
"(", ")", ...);
which will cut the string at the position a char from array exists
between minlength and maxlength, if not, cut it at position atlength.
Any ideas anyone?
TIA, frank