Created
September 21, 2025 10:46
-
-
Save zazaulola/9232e194509bf4b0f166e3feeb9ccdbf to your computer and use it in GitHub Desktop.
Split a large string into strings of a specified length
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const splitString = (str, num = 72) => str.split(new RegExp(`(?<=^(?:.{${num}})*)`,'g')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment