Split string into n pieces (or pieces of length n)
JavaScript (ES6), 132 bytes

(s,t)=&gt;+t?[...Array(-~(~-s.length/+t))].map((_,i)=&gt;s.substr(i*t,t)):[...Array(s=+s)].map(_=&gt;t.slice(p,p-=~((t.length-p-1)/s--)),p=0)


This is probably hopelessly over-engineered.