This commit is contained in:
BinTianqi
2024-03-10 17:49:32 +08:00
parent 7bd9eaaa46
commit d7ed1b2071
18 changed files with 2552 additions and 1900 deletions

View File

@@ -24,3 +24,23 @@ fun uriToStream(
catch(e: IOException){ Toast.makeText(context, "IO异常", Toast.LENGTH_SHORT).show() }
}else{ Toast.makeText(context, "空URI", Toast.LENGTH_SHORT).show() }
}
fun List<Any>.toText():String{
var output = ""
var isFirst = true
for(each in listIterator()){
if(isFirst){isFirst=false}else{output+="\n"}
output+=each
}
return output
}
fun Set<Any>.toText():String{
var output = ""
var isFirst = true
for(each in iterator()){
if(isFirst){isFirst=false}else{output+="\n"}
output+=each
}
return output
}