I like this approach in node:
big = str => { const out = Buffer.from(str, "ucs2"), len = out.length for (let i = 0; i < len; i += 2) { const ascii = out[i] if (ascii < 0x21 || ascii > 0x7E) continue out[i] = ascii - 0x20 out[i + 1] = 0xff } return out.toString("ucs2") } big("Big Chungus")
Could probably do similar with TextEncoder in web.
TextEncoder
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I like this approach in node:
Could probably do similar with
TextEncoder
in web.