Skip to content

Instantly share code, notes, and snippets.

@mikedugan
Created February 14, 2015 02:35
Show Gist options
  • Save mikedugan/a8af059c5879d79455f9 to your computer and use it in GitHub Desktop.
Save mikedugan/a8af059c5879d79455f9 to your computer and use it in GitHub Desktop.
swift func
func createHtmlLink(linkTitle title: String = "Click Me", href: String = "#", #titleFormatter: (String) -> String) -> String
{
return "<a href=\"\(href)\">\(titleFormatter(title))</a>"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment