Text to hex
The UTF-8 bytes, two hex digits each.
Result
Why you would use this
What the text actually is on disk or on the wire. Watch a plain letter take one byte and an emoji take four — the reason "string length" is such a slippery idea.
The UTF-8 bytes, two hex digits each.
What the text actually is on disk or on the wire. Watch a plain letter take one byte and an emoji take four — the reason "string length" is such a slippery idea.