dvdandroid
10/02/2022, 1:15 PM:mainModule:submodule1:submodule2
?
now i'm using this code snippet
val libParents = mutableListOf(name)
var tempParent = parent
while (tempParent != null) {
libParents.add(tempParent!!.name)
tempParent = tempParent!!.parent
}
then i use it with joinToString()
.
if not, is it possible to optimize that code, removing the temp
,var
or even the while
loop? maybe using a kotlin fold function or something like thatephemient
10/02/2022, 1:57 PMproject.path
?dvdandroid
10/02/2022, 2:04 PM