Skip to content

Instantly share code, notes, and snippets.

@jrenner
Last active August 29, 2015 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrenner/10521775 to your computer and use it in GitHub Desktop.
Save jrenner/10521775 to your computer and use it in GitHub Desktop.
fun StringBuilder.plus(added: String?): StringBuilder {
this.append(added ?: "null")
return this
}
fun example() {
val sb = StringBuilder()
sb + "hello" + "I" + "am" + "a" + "StringBuilder".toString()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment