@mathias read some of your unicode articles! Good job! Do you know any good JS lib for unicode strings manipulation (length, slice methods)?
-
-
Replying to @suprMax
I don’t know of any libraries, but for length you don’t really need one: https://mathiasbynens.be/notes/javascript-unicode#accounting-for-astral-symbols …
1 reply 1 retweet 2 likes -
Can kinda inline it with .match(/([\ud800-\udbff][\udc00-\udfff]|.|\n)/g).length too
#dirtyhack1 reply 0 retweets 0 likes -
Replying to @FakeUnicode @mathias
I’m getting screwed on shortening strings with emojis. Weird that I could find any solutions on npm :(
2 replies 0 retweets 0 likes -
Replying to @suprMax @FakeUnicode
Try `lodash.truncate`: https://lodash.com/docs#truncate pic.twitter.com/LMqsnxdGbi
1 reply 0 retweets 0 likes -
Replying to @mathias @FakeUnicode
didn't know it was unicode aware! awesome! thanks!
1 reply 0 retweets 0 likes
Replying to @suprMax @FakeUnicode
Most of lodash string methods are, thanks to @jdalton :)
9:23 AM - 10 Jun 2016
0 replies
0 retweets
1 like
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.