jlandon / Alexandria

A library of Swift extensions to turbocharge your iOS development.
https://jlandon.github.io/Alexandria
MIT License
65 stars 8 forks source link

add string literal initializers to CharacterSet and URL #31

Closed jlandon closed 7 years ago

jlandon commented 7 years ago

You can now create CharacerSets and URLs from string literals

let set: CharacterSet = "abcdefg"
let url: URL = "http://ovenbits.com"

Also added an operator overload for appending path components to urls

let url: URL = "https://github.com"
url + "ovenbits" // https://github.com/ovenbits
krider2010 commented 7 years ago

The URL aspect of that I can use right now, given code I've written recently - nice!

jlandon commented 7 years ago

@hsoi good call on the copyright/license and unit tests. 👍

Concerning the initializers, they're specified by the ExpressibleByStringLiteral protocol, so they can't be failable.

hsoi commented 7 years ago

@jlandon Ah, I did not know that about the protocol. OK, then that settles that question. 😆

hsoi commented 7 years ago

@jlandon Going to merge. Do you need a version bump and/or release? I don't want to make a x.1.x release just for this... would rather collect a few things before making a release. But if you need one, let me know.

jlandon commented 7 years ago

@hsoi nah, I usually pull directly from master anyways, so no need for a new release

hsoi commented 7 years ago

@jlandon I figured as much. We'll bump a new version/release when there's more stuffs 👍