DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
9+3 =
Submit