Skip to content

Instantly share code, notes, and snippets.

View DanielStormApps's full-sized avatar
👨‍💻
Looking at your code

Daniel Storm DanielStormApps

👨‍💻
Looking at your code
View GitHub Profile
@DanielStormApps
DanielStormApps / EmailValidator.swift
Last active March 16, 2021 14:22 — forked from darthpelo/EmailValidator.swift
This regular expression is adapted from a version at regular-expressions.info and is a complete verification of RFC 2822. Source: http://www.cocoawithlove.com/2009/06/verifying-that-string-is-email-address.html. Dedicate article: https://medium.com/@darthpelo/email-validation-in-swift-3-0-acfebe4d879a
extension String {
/// Checks if the `String` is a valid email address.
/// ````
/// // Example
/// "name@email.com".isValidEmailAddress() // true
/// "name(at)email(dot)com".isValidEmailAddress() // false
/// "name@email".isValidEmailAddress() // false
/// "name@.com".isValidEmailAddress() // false
/// "name.com".isValidEmailAddress() // false
UIFont.familyNames.sorted().forEach{ familyName in
print("*** \(familyName) ***")
UIFont.fontNames(forFamilyName: familyName).forEach { fontName in
print("\(fontName)")
}
print("---------------------")
}
/*
*** Academy Engraved LET ***