Skip to content

Instantly share code, notes, and snippets.

@heapwolf
Created August 6, 2012 16:57
Show Gist options
  • Save heapwolf/3276566 to your computer and use it in GitHub Desktop.
Save heapwolf/3276566 to your computer and use it in GitHub Desktop.
buffer/manipulate
var frosty = new Buffer(24);
var snowman = new Buffer("☃", "utf8");
frosty.write("Happy birthday! ", "utf8");
snowman.copy(frosty, 16);
frosty.toString("utf8", 0, 19);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment