This is very easy to do with a regex:
var text = '75 characters long (really!) — well... maybe not, but you get the picture.',
broken;
broken = text.replace(/([^\0]{25})/g, '$1\n');
As shown here: http://jsbin.com/ajiyo/3 .
Change . To explain the regex: it will match any character string (collection of every character except NUL) 25 characters long.
The brackets () mean that this part must be captured, and the "$ 1" part of the second argument (replacement string) refers to this first capture.
25 " ". 25 , , .
2nd edit: , , . , NUL, NUL .