https://kotlinlang.org logo
p

pavel

01/30/2019, 11:23 PM
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 = ""
           }
some of the lines might be longer than 67 chars
👍 1