Coding since 11yo, that makes it over 30 years now ~~~
Have a PhD in Comp Sci ~~~
Love to go on bike tours ~~~
I try to stay as generalist as I can in this crazy wide place coding is at now.
Regex matches single letters preceded by a word boundary or followed by a word boundary.
Running through the examples:
["and still i rise","when words fail music speaks","WHAT WE THINK WE BECOME","dIe wITh mEMORIEs nOt dREAMs","hello"].map(s=>`"${s}" -> "${capitalizeFirstLast(s)}"`).join("\n")>>"and still i rise"->"AnD StilL I RisE""when words fail music speaks"->"WheN WordS FaiL MusiC SpeakS""WHAT WE THINK WE BECOME"->"WhaT WE ThinK WE BecomE""dIe wITh mEMORIEs nOt dREAMs"->"DiE WitH MemorieS NoT DreamS""hello"->"HellO"
Coding since 11yo, that makes it over 30 years now ~~~
Have a PhD in Comp Sci ~~~
Love to go on bike tours ~~~
I try to stay as generalist as I can in this crazy wide place coding is at now.
An easy option is to start off by lowercasing the whole thing...
(JS)
Regex matches single letters preceded by a word boundary or followed by a word boundary.
Running through the examples:
Nice! Super clean.
Thanks!