Skip to content

Instantly share code, notes, and snippets.

View tobiassteenweg's full-sized avatar

tobiassteenweg

  • UniNow GmbH
  • Magdeburg
View GitHub Profile
@tobiassteenweg
tobiassteenweg / String+EncodeURIComponent.swift
Created July 25, 2015 11:18
encodeURIComponent() in swift
extension String {
func encodeURIComponent() -> String? {
var characterSet = NSMutableCharacterSet.alphanumericCharacterSet()
characterSet.addCharactersInString("-_.!~*'()")
return self.stringByAddingPercentEncodingWithAllowedCharacters(characterSet)
}
}