5 ms·For those using Node.js, the same is var len = Buffer.byteLength(a_string, 'utf8')by BrianHammond 16y agoFor those using Node.js, the same is var len = Buffer.byteLength(a_string, 'utf8')