mirror of
https://github.com/awfixers-stuff/OwnDroid.git
synced 2026-03-23 19:15:58 +00:00
REDESIGN
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user