Tech Lead/Team Lead. Senior WebDev.
Intermediate Grade on Computer Systems-
High Grade on Web Application Development-
MBA (+Marketing+HHRR).
Studied a bit of law, economics and design
Location
Spain
Education
Higher Level Education Certificate on Web Application Development
Tech Lead/Team Lead. Senior WebDev.
Intermediate Grade on Computer Systems-
High Grade on Web Application Development-
MBA (+Marketing+HHRR).
Studied a bit of law, economics and design
Location
Spain
Education
Higher Level Education Certificate on Web Application Development
Yeah this one is also good but then I had to explain this also and i am trying to show everything as a beginners perspective so later they can simplify the code on their own and come with these type of one liner solutions ๐
Also I want to explain join and split in a separate posts that's why I didn't explained much about them in this blog ๐๐
Tech Lead/Team Lead. Senior WebDev.
Intermediate Grade on Computer Systems-
High Grade on Web Application Development-
MBA (+Marketing+HHRR).
Studied a bit of law, economics and design
Location
Spain
Education
Higher Level Education Certificate on Web Application Development
Tech Lead/Team Lead. Senior WebDev.
Intermediate Grade on Computer Systems-
High Grade on Web Application Development-
MBA (+Marketing+HHRR).
Studied a bit of law, economics and design
Location
Spain
Education
Higher Level Education Certificate on Web Application Development
reverseStr('๐hi๐ hello')// 'olleh๐ ih๐'reverseStr('๐ะฟัะธะฒะตั')// 'ัะตะฒะธัะฟ๐'reverseStr('ๅพ่ผฉใฏ็ซใงใใ๐ฑ')// '๐ฑใใใง็ซใฏ่ผฉๅพ'reverseStr('๐ฎโ๐จ')// '๐จโ๐ฎ' <-- this is a ZWJ Sequence working properly// You can also set the `u` flag for Unicode codepoints like that:"๐๐".split(/(?:)/u);// [ "๐", "๐" ]
but this won't work for someZWJ Sequences (multiple emojis joined with a zero-width joiner character being displayed as a "single emoji") and I was wondering why.
Thus it actually works "fine", or as intended from the computation point of view, it's just that we don't have a valid "translation" to show the result, let's say computer ‍ skin-tone-medium ‍ human and something similar should be happening with hindi words (and presumably other languages).
Whenever you need to work with ZWJ Sequences or some specific languages, Intl.segmenter is the option because it simply doesn't break those joined unicodes into something "unreadable". And to be precise it doesn't reverse the icons.
If the standard covered symbols to be directional let's say "faceโairBlow"๐ฎโ๐จ and then "airBlowโface" being the opposite (blowing to the left) and also joining the modifiers to the compatible icons (either be right or left), every emoji sequence could be effectively reversed without breaking the "emoji" render.
On the other hand I can't understand -yet- why Firefox is not supporting it, I'll search to see if I can find the reason somewhere.
Do you guys have more detail on that?
Edit: I get some info about it here if you want to check. TL;DR It will be supported in short (theoretically).
Another one, this time with recursion:
๐
yeah but i only tried to discuss the inbuilt reverse() array method but this one liner implementation is also cool ๐
Say no more:
๐๐
I'm loving this posts you do on your learning, following up to read more ๐
Yeah this one is also good but then I had to explain this also and i am trying to show everything as a beginners perspective so later they can simplify the code on their own and come with these type of one liner solutions ๐
Also I want to explain join and split in a separate posts that's why I didn't explained much about them in this blog ๐๐
seen 1000 times and wrong 1000 times...
Yes yees we know, that doesn't mean it's wrong. You don't need to deal with emojist most of the time and when you do, simply
There are multiple ways to deal with that ๐คท๐ปโโ๏ธ
the only correct way: Intl.Segmenter!!
it's not about emojis, it's plain and simple also about characters in other languagesโฆ
dev.to/lukeshiru/comment/20d68
Intl.Segmenter is not working with Firefox
use a polyfilll
So I tried to break this down a bit
but this won't work for some ZWJ Sequences (multiple emojis joined with a zero-width joiner character being displayed as a "single emoji") and I was wondering why.
If we look at the Unicode Technical Standard, @lukeshiru you pick the emoji wisely to showcase.
Actually it's doing "great" reversing the whole thing as it did with
The issue I think is that the "computer" can't be joined with the "skin tone" and we see this weird symbol because skin tone does not work standalone.
Also I noticed that destructuring has issues with words in hindi as well:
Thus it actually works "fine", or as intended from the computation point of view, it's just that we don't have a valid "translation" to show the result, let's say
computer ‍ skin-tone-medium ‍ humanand something similar should be happening with hindi words (and presumably other languages).Whenever you need to work with ZWJ Sequences or some specific languages,
Intl.segmenteris the option because it simply doesn't break those joined unicodes into something "unreadable". And to be precise it doesn't reverse the icons.If the standard covered symbols to be directional let's say "faceโairBlow"๐ฎโ๐จ and then "airBlowโface" being the opposite (blowing to the left) and also joining the modifiers to the compatible icons (either be right or left), every emoji sequence could be effectively reversed without breaking the "emoji" render.
On the other hand I can't understand -yet- why Firefox is not supporting it, I'll search to see if I can find the reason somewhere.
Do you guys have more detail on that?
Edit: I get some info about it here if you want to check. TL;DR It will be supported in short (theoretically).
this goes directly above my head ๐๐