This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// This program is free software. It comes without any warranty, to | |
// the extent permitted by applicable law. You can redistribute it | |
// and/or modify it under the terms of the Do What The Fuck You Want | |
// To Public License, Version 2, as published by Sam Hocevar. See | |
// | |
// http://sam.zoy.org/wtfpl/COPYING | |
// | |
// for more details. | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIImageView+Nuke.swift | |
// | |
// | |
// Created by Aline e Tulio on 29/04/19. | |
// Copyright © 2019 . All rights reserved. | |
// | |
import UIKit | |
import Nuke |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import Foundation | |
extension String { | |
/// Return all matches substrings from this string using this regex | |
/// | |
/// - Parameter regex: A string Regex to match | |
/// - Returns: array of substrings that matches this regex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
extension String { | |
/// Return a mimified email from this string, like glau***@gmail.com, the mimified length is half as the email length | |
var emailMinified : String? { | |
get { | |
var email = self | |
if let atIndex = email.components(separatedBy: "@").first?.endIndex { | |
let middleIndex = atIndex.encodedOffset/2 |