title: Split string using loop to specific length sub-units
body: <p>I need to split a string into specific lengths, e.g. if user specifies it to units of max length 4, then the loop should run on the original input <code>"0123456789asdf"</code> to get <code>"0123"</code>, <code>"4567"</code>, <code>"89as"</code>, <code>"df"</code>.</p>
  
  <p>I can't really figure out the best way to do this - and I need it to be in a loop as further processing needs to be done on each subunit of the strong. TIA.</p>
  
  <p>edit: I do not know how long the original string is, and I only know the size of the chunk it needs to become. Also, I need chunks of the string of the specified length, and the last chunk containing the <em>remainder</em> of the string (if it is less than the specified length).</p>