Skip to content

Instantly share code, notes, and snippets.

@jakubpetrik
Created September 23, 2015 06:30
Show Gist options
  • Save jakubpetrik/98f290de2ebced2d01d4 to your computer and use it in GitHub Desktop.
Save jakubpetrik/98f290de2ebced2d01d4 to your computer and use it in GitHub Desktop.
String and print with support for a drama
extension String {
var dramatically: String { return self + ", ..." }
}
func printWithDrama(items: Any..., separator: String = " ", terminator: String = "\n") {
print(items.map { "\($0)" }.joinWithSeparator(separator).dramatically, terminator: terminator)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment