📜  java 按长度拆分字符串 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:32.806000             🧑  作者: Mango

代码示例3
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']