Untitled

Anonymous
Plain Text
01/18/2021 8:09 AM
324 B
90
Indexable
Never
val newList = mutableListOf<String>()
        for (item in source) {
           if(item.contains("\n")) {
               val split = item.split("\n")
               for (splitItem in split){
                   newList.add(splitItem)
               }
           } else{
               newList.add(item)
           }
        }
Editor is loading...