Does anyone have a more sophisticated solution/library for truncating strings with JavaScript and putting an ellipsis on the end, than the obvious one:
if (string.length > 25) {
string = string.substring(0, 24) + "...";
}
Does anyone have a more sophisticated solution/library for truncating strings with JavaScript and putting an ellipsis on the end, than the obvious one:
if (string.length > 25) {
string = string.substring(0, 24) + "...";
}