/format

string split in certain format

Primary LanguageJavaScript

format

string split in certain format

"hello".splitRange(2)
//output: [ 'he', 'll', 'o' ]

"hello".format("__", 3)
//output: 'hel__lo'