Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js split string every n characters

foo.match(new RegExp('.{1,' + n + '}', 'g'));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #split #string #characters
ADD COMMENT
Topic
Name
3+2 =