@mathias what's the edge case to encoding a 16bit unsigned number as a single character using String.fromCharCode() and s.charCodeAt(0)?
For characters though… It may not result in a “character” i.e. a scalar value. Could be a single surrogate, or a non-char like FFFE
-
-
and will the length of the string be as long as the number of nums encoded this way, no matter what their value? just confirming :)
-
As long as you stick to 16-bit unsigned integers, then you’re all good!
End of conversation
New conversation -
-
-
yeah but it won't start returning larger numbers than expected? always 16bit no matter what? i dont care about the string value.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.