Skip to content

Instantly share code, notes, and snippets.

@BasThomas
Created December 2, 2016 12:14
Show Gist options
  • Save BasThomas/5d600bbd3057824198c051d0846735c3 to your computer and use it in GitHub Desktop.
Save BasThomas/5d600bbd3057824198c051d0846735c3 to your computer and use it in GitHub Desktop.
import Foundation
URL(string: "https://en.wikipedia.org/wiki/Flesch–Kincaid_readability_tests#Flesch_reading_ease") // nil
URL(string: "https://en.wikipedia.org/wiki/Flesch-Kincaid_readability_tests#Flesch_reading_ease") // valid
URL(string: "https://en.wikipedia.org/wiki/Flesch–Kincaid_readability_tests#Flesch.E2.80.93Kincaid_grade_level") // nil
URL(string: "https://en.wikipedia.org/wiki/Flesch-Kincaid_readability_tests#Flesch.E2.80.93Kincaid_grade_level") // valid
"https://en.wikipedia.org/wiki/Flesch–Kincaid_readability_tests#Flesch_reading_ease" ==
"https://en.wikipedia.org/wiki/Flesch-Kincaid_readability_tests#Flesch_reading_ease" // false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment