Last active
June 15, 2018 15:29
-
-
Save ericharlow/2acb3c31be3a238b870e563e6d405a1b to your computer and use it in GitHub Desktop.
Makes a printable string of the contents of a Bundle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun Bundle.toContentString(): String { | |
val builder = StringBuilder("Extras:\n") | |
for (key in keySet()) { | |
val value = get(key) | |
builder.append(key).append(": ").append(value).append("\n") | |
} | |
return builder.toString() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment