I have the following code in PHP:
$v = mb_strlen($linebuffer, 'HTML-ENTITIES');
which works for strings like "X "FUEL""
and returns 8 (X "FUEL").
I need this exact same code in javascript and/or jquery. Does this exist or will I have to write an entire parser in javascript?