@mathias Hey! What would you recommend for unicode-safe text truncation in JS?
@phuunet I’m not aware of any libraries that do this yet, but you could just .slice, then check if last code unit is a high surrogate
-
-
-
@giuseppegurgone Words in which language? IMO, best to leave that to another tool and just make a sold truncate() function.@mathias - 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.