Skip to content

Instantly share code, notes, and snippets.

@jdsingh
Created April 15, 2018 16:48
Show Gist options
  • Save jdsingh/6bc204fc9b13de9005b6847eaa068df5 to your computer and use it in GitHub Desktop.
Save jdsingh/6bc204fc9b13de9005b6847eaa068df5 to your computer and use it in GitHub Desktop.
infix fun String.shouldBeSame(other: String) = this == other
// calling the function using the infix notation
"bello" shouldBeSame "bello"
// is the same as
"hello".shouldBeSame("hello")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment