Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert string to buffer javascript

// If you can use Node.js you can use the from() method

const str = "Hey. this is a string!";
const buff = Buffer.from(str, "utf-8");

console.log(buff);
Source by melvingeorge.me #
 
PREVIOUS NEXT
Tagged: #convert #string #buffer #javascript
ADD COMMENT
Topic
Name
2+6 =