Last active
February 28, 2018 07:07
-
-
Save andrewmunn/a0923936a91c3781f38a40b15defe798 to your computer and use it in GitHub Desktop.
toSingleLineStringForDisplay in Kotlin v2
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 toSingleLineStringForDisplay() = buildString { | |
append(street1).append(", ") | |
street2?.let { append(it).append(", ") } | |
street3?.let { append(it).append(", ") } | |
street4?.let { append(it).append(", ") } | |
append(city).append(", ") | |
append(state).append(" ") | |
append(postalCode) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment