If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

The way the function works:
The function always returns an Array with a length of 2 elements.
The given argument is the maxium string-length to allow for the the first element.
The second element is the remaining string that gets cut-off by the first element.

It looks like when you made your splitAt function, you were thinging of the split function.
When I made my function, I was think about how to split a string into two parts and return the two w/o losing any part of the string.

I needed to send a multi dimensional array to function through setTimeout, however this lost the internal structure of it so I created this that would turn it into a string that calling eval() would reconstruct it, and setTimeout is kind of like eval():