Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js get string byte size

// JavaScript
(new Blob(['20€'])).size;		// 5

// Node js
Buffer.from('20€').length;	// 5
 
PREVIOUS NEXT
Tagged: #js #string #byte #size
ADD COMMENT
Topic
Name
2+7 =