Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java split string by length

String[] strings = "Thequickbrownfoxjumps".split("(?<=G.{4})"); // split all 4 chars
String[] strings = "Thequickbrownfoxjumps".split("(?<=G.{100})"); // this would be all 100 chars 
// -> ['Theq', 'uick', 'brow', 'nfox', 'jump', 's']
 
PREVIOUS NEXT
Tagged: #java #split #string #length
ADD COMMENT
Topic
Name
9+9 =