Breaks a vector into defined segment lengths

Another gist written for stack overflow. This breaks up a vector defined lengths and accounts for the remainder size. Great for splitting up a vector for saving into different files. It is a loop, but any performance issues should be minimal and increases readability/extendability.

Comments are closed.