You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
392 B
22 lines
392 B
|
|
/*!
|
|
* Canvas - Buffer
|
|
* Copyright (c) 2010 LearnBoost <tj@learnboost.com>
|
|
* MIT Licensed
|
|
*/
|
|
|
|
/**
|
|
* Concatenate `this` Buffer with `other`.
|
|
*
|
|
* @param {Buffer} other
|
|
* @return {Buffer}
|
|
* @api public
|
|
*/
|
|
|
|
Buffer.prototype.concat = function(other) {
|
|
var len = this.length
|
|
, buf = new Buffer(len + other.length);
|
|
this.copy(buf, 0, 0);
|
|
other.copy(buf, len, 0);
|
|
return buf;
|
|
};
|