I don’t have a good functional solution here, but 2 pointers:
1) when adding code in Slack, surround it with 3 backticks so that it’s easier to read
2) I think your code is not doing what you think it’s doing. Since you are doing
Copy code
if (line.length >= 67) {
list.add(line.trim())
line = ""
}