String.prototype.slice for streams