Javascript String splitLength(size)
String.prototype.splitLength = function(size) { var regex = new RegExp('.{1,' + size + '}', 'g'); return this.match(regex); };